glsl-optimizer icon indicating copy to clipboard operation
glsl-optimizer copied to clipboard

Failed to compile shaders that has nested struct

Open cowcoa opened this issue 9 years ago • 1 comments

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.

cowcoa avatar Feb 13 '15 08:02 cowcoa

Anybody here? Help plz. :(

cowcoa avatar Feb 16 '15 02:02 cowcoa