glsl-optimizer
glsl-optimizer copied to clipboard
Failed to compile shaders that has nested struct
Hi aras, I found the optimizer cannot correctly dealing with nested structure. e.g, the following code:
struct fragInput { highp vec4 baseTC; } struct fragPass { fragInput IN; }
will be interpreted by the optimizer as:
fragInput tmpvar_1; tmpvar_1 = fragInput(vec4(0.0, 0.0, 0.0, 0.0));
but, struct fragInput's declaration is missing. How to solve this problem?
thanks a lot.
Anybody here? Help plz. :(