i’m modifying some old glsl code (yeah right), and have discovered that i don’t seem to be able to use the ‘varying’ directive on a struct without getting a warning from the nvidia compiler…thus:
warning C7514: OpenGL does not allow varying of type struct LightVarying[1]
i really despair at nvidias shader compiler. Nested constant controlled loops (not uniforms, friggin hard coded numbers) confuse the hell out of it. I’m sick of unrolling loops because their compiler is shite. It’s 2011 now and they’ve still got bugs doing straight c parsing. I wrote c parsers at A’level when I was 17. It’s a no-brainer.
Fragment inputs can only be signed and unsigned integers and integer vectors, floating
point scalars, floating-point vectors, matrices, or arrays or structures of these.
This rules out arrays of structures, so their compiler isn’t that bad.