I’m been experimenting with interface blocks and I’m trying to determine if the following is valid GLSL because it doesn’t work on a NVidia Geforce 480 with 256.53 drivers. If I change both “varOUT” and “varIN” to the same identifier, e.g. “var”, then it works.
“Matched block names within an interface (as defined above) must match in terms of having the same
number of declarations with the same sequence of types and the same sequence of member names…”
I wasn’t talking about member names. Obviously member names have to match. I was talking about interface block names. And even those have to match. I was specifically saying that you can have two interface blocks in the same shader with the same block name, so long as they have different scope names.
So, returning to what I think Sir Hampster was trying to do, does GLSL provide a way to use layout blocks like Cg uses interface blocks?
For example: OUT.color = IN.color, where IN and OUT are interface blocks/layouts/etc. Where you’d call the vertex output varyings by OUT in the vert shader and IN in the frag shader.