GLSL icon indicating copy to clipboard operation
GLSL copied to clipboard

Improper example for input variable declaration in VS in ESSL 3.20 spec

Open lucmann opened this issue 4 years ago • 3 comments

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?

lucmann avatar Apr 27 '21 23:04 lucmann

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.

gnl21 avatar May 12 '21 15:05 gnl21