Can I see shader preprocessor output?

Posted by GLaddict on Stack Overflow See other posts from Stack Overflow or by GLaddict
Published on 2009-06-04T19:43:16Z Indexed on 2010/03/27 15:13 UTC
Read the original article Hit count: 294

Filed under:
|

I am using #defines, which I pass runtime to my shader sources based on program state, to optimize my huge shaders to be less complex. I would like to write the optimized shader to a file so that next time I run my program, I do not have to pass the #defines again, but I can straight compile the optimized shaders during program startup because now I know what kind of shaders by program needs.

Is there a way to get the result from shader preprocessor? I can of course store the #define values to a file and based on that compile the shaders during program startup but that would not be as elegant.

© Stack Overflow or respective owner

Related posts about shader

Related posts about preprocessor