GLSL
GLSL copied to clipboard
Improper example for input variable declaration in VS in ESSL 3.20 spec
I read about input variable type for vertex shader in GLSL_ES_Specification_3.20
the section below quotes from 4.3.4. Input Variables at P48:
It is a compile-time error to declare a vertex shader input with, or that contains, any of the following types: • A boolean type • An opaque type • An array • A structure Example declarations in a vertex shader:
in vec4 position;
in vec3 normal;
in vec2 texCoord[4];
I wonder that if the last one of examples texCoord[4] should be there. Is that a copy-paste error?
Yes, that example is incorrect. It's valid in the desktop shading language but not in ES. It'll be removed in the next revision of the spec.