Update 2013: Fixed link to RenderMonkey, which has been discontinued. Also, this post is a bit outdated. Have a look at Cuda for a GPU-based language with good debugging support.
Because my current Suggestive Contours/Suggestive Highlights implementation is written using OpenGL calls for rendering, it was best to start work on the vertex/fragment shaders for a GPU implementation in the OpenGL shading language (GLSL). This would reduce OS/Platform dependency too. Another option was using Nvidia’s Cg, which claims to be compatible with an OpenGL renderer too, but documentation about this was scarceIn order to write the GLSL shader implementation (something I don’t have a lot of experience with), I searched for a good IDE to use.
As I already learned, debugging code that basicly runs on the GPU is far from trivial. There’s no breakpoints, no print statements, … A lot of forums talk about a technique which consists of setting certain fragments(pixels) to a certain RGB value to communicate information, e.g., turning a pixel bright red when some error occured.
Since time is never on the side of a thesis student, I tested some IDE’s which would allow me to rapidly develop a good GLSL shader. In doing this I also experimented with several language examples, to pick up the structure and inner workings of the wonderful world of GLSL shading.
- RenderMonkey (by AMD): a tool which allows development and testing of GLSL/HLSL/CG shaders. This came with some good (and impressive) examples. The tool itself is solid, has a good editor and preview renderer. Only downside I found so far is that it’s Windows-only, but I suppose that doesn’t really matter for the end result shaders.
- Typhoonlabs Shader Designer: This was somehow pitched as the ‘standard’ for editing and testing GLSL shaders. The editor however, seems to be bug-riddled and does not offer auto-completion. There also seem to be some incompatibilities with the most recent Mesa drivers.
- glslDevil Shader Debugger: A new and interesting tool without an editor, but with a good debug view.
The verdict: I’ll develop my vertex/fragment shader in RenderMonkey (which is coupled with at least some sort of GLSL reference, which should come in handy) and then build it in my existing implementation or use it independently in a simple demo program. After that,, I hope to have a compatible shader for the open source game engine irrLicht.