Quote Originally Posted by Kornman00 View Post
Aren't those shader code strings just compiled at run time? If you're going to completely hard code them, why not keep the comments as actual comments in the code there by reducing your executable's size and amount of work the parser has to do? Did you say exactly why your shader code is embedded in the source as strings already?
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.