The comments are there because I haven't gotten around to removing them. I have a big "TODO:" stamp at the top of the Shader class with a list of things that need optimizing. The shader class has gone through so many complete rewrites recently I just haven't seen a reason to optimize it.
The glsl shader code is broken up into a lot of pieces and I just take the pieces I need for each shader and glue them together (along with any parameters specified in the games shader files) to create a shader specialized for each material.
Making a holographic light? Shader just grabs the illumination code and transparency code.
Making a metal floor? Shader grabs lighting, normals, and specular.
Bookmarks