GLSL Shader Development - Make Your Own Tool, Fool
March 28, 2011One of my many tasks for the MMO game company is working on a set of procedural natural material shaders. We have an enormous amount of territory in our game, with over 600 towns, some with as many as 900 buildings. There are only so many different buildings so most appear hundreds of times and each is identical. Our ground terrain is also really minimally different (made up of some multitextures) that no matter where you are it looks mostly the same. The goal is to build shaders to create unique materials that make things look different and less repetitive.
The problem is there are no decent tools for OSX to develop shaders in, and even on the PC the choice is poor. So to have a decent tool to do this (relatively hard) work I figured I'd write my own tool in Cocoa.
I tried Lumina but had a hard time getting it to compile, and the UI is rather odd. ShaderMaker was terrible unstable. Apple's own OpenGL Shader Builder is minimal, apparently unloved at Apple, and continuously "lost" the render window. I finally complained to Apple's feedback page and offered to help. I got an email from a recruiter there but they require one to work in Cupertino and I refuse to leave Texas, I said no thanks. Which leaves me with making my own tool.
For right now I need OpenGL 2.1. I hope to support 3.2 on Lion and WebGL once Safari ships with it turned on (come on Apple get moving). The gorilla in the mix is OpenGL ES 2.0 which I can only see to run inside the Simulator or on a device which would require writing yet another app. Ugh. Working at Apple I assume would allow easier integration, but that's not happening. In order to sell this thing (if I want to) I really need ES.
Screen shot, doesn't do much yet but Cocoa is so easy to push stuff out. It already saves/reads the project file and I have a good start on the uniforms (which is by far the most work). For me I simply want to use Textmate as the editor and not bother with integrating one. I probably could use Webkit to create a nice JS based editor at some point. At first I even though of building the whole tool inside Webkit but decided it was a little more work.