|Home||Daily (well) diary.|
For older blogs visit the 2008 blog, the 2009 blog, or the 2010 blog.To automatically get updated with any news here, use this RSS link.
13-01-2012 - The Mayans are coming?
There I am, working on GLSL shaders with texturing. It's Friday the 13th though, and what is the framerate I'm getting? Hmm. ;-)
12-01-2012 - GLSL
Not a great screenshot perhaps, but this shot shows the first loaded GLSL shader since Cg upgraded Racer's graphics enormously. Cg is great but has a couple of problems: it is mostly nVidia targeted (ATI drivers seemingly only get a few of the older profiles, thus missing out on useful features such as texCUBElod for mipmapped environment map lookups). It also doesn't seem to support UBO (Uniform Buffer Object) to pass global parameters to a lot of shaders all at once. Also, GLSL's predefined variables such as gl_ModelViewProjectionMatrix make sure that you don't need to pass a certain number of parameters at all.
The downside is that a LOT of Cg shaders have made it into Racer already, and this might be a lot of work to all get working again (we're doing multiple projectors with overlap and distortion in the commercial world with Cg, for example).
An example shot below of the first GLSL program in action (for all materials except those that didn't even have a Racer shader defined). The nice thing is that GLSL program switching is already cached, so materials with the same vertex & fragment shader combination are drawn together where possible (things like depthwriting might screw the order up). The shader only transforms vertices, and then outputs... green. ;-)
(last updated December 30, 2014 )