I’ve been spending much of the last year, and particularly of the last couple of weeks, finally seriously pursuing a field of programming I’ve long found fascinating: Shaders. This is the perfect field for programmers who are also visual artists, as shaders are what determine how images get rendered on the screen in games and in other 3d applications.
A shader broadly consists of two parts: The vertex program, which interprets the shape of the object, and sometimes modifies it; and the fragment program, which interprets the color of the object, and usually modifies it – generally by way of various lighting, reflection, and shadow algorithms. This is, naturally, a gross oversimplification. Suffice it to say that, with an open imagination, the range of things that could be rendered and ways to render those things are effectively unlimited. In practice, such aesthetic ambitions seldom exceed or supplant the straightforward, if stringent, demands of realism – or, anyway, the hyper-saturation comic book version of realism that dominates the big-budget game space.
Many games, particularly indie games, don’t bother with shader coding in any substantial way. I mean, the shaders are there – any game made to take advantage of modern hardware uses them somewhere, somehow. However, for most projects the freely available default shaders are sufficient. Once you have something that gets images and 3d models functional in the game world, a lot of developers are perfectly satisfied to have all those things rendered in basically the same way. My ideas of how I want things to look, though, are a little more particular, and frequently unsupported by general-use shaders. The demanding nature of having a specific vision is one drawback to being both artist and programmer.
I have, meanwhile, also been preparing to move, and looking through my old art to decide what’s worth bringing along. It’s strange to think back to not too long ago, when it was me sitting there with pencil and eraser, paint and brush and water, when it was me interpreting the shape, when it was me interpreting the color, the light, the shadow, noticing the style of my own shading. Now I try to teach my video card to do it.
Artists really only ever make self-portraits, and everyone’s an artist. Or, perhaps more precisely, what artists make are reflections, and the artist is the pool that light reflects against, contorting this way and that to form light puppets. Most onlookers will only see the image on the surface – some will be able to read the ripples and understand the direction of the current. Many people regard themselves as pure disciples of technology, and fail to perceive the tiny versions of themselves, by way of assumption and calculation, projected into their code. In the same way that every character you write is a part of yourself, every program you write is an excerpt of your thought processes. Parts of you you might never have intended find their way in – and only by expanding your thought processes, only by opening yourself to new understandings, can you expand the scope of what is possible.
So I write shaders, trying to describe the process of seeing the world to a machine, that it can know how to show what I see in my mind to the world. So I write words, so you can know what it is to etch an aesthetic autobiography into algorithm.