
5. The GLSL Shader Interfaces 71
Vertex array
attribute type
Vertex shader
input type
Match?
3 x float vec3 yes
4 x float vec3 yes
2 x float vec3 yes
2 x int int yes
2 x int float yes
2 x double vec2 yes
2 x double dvec2 yes
3 x double dvec2 no
2 x float ivec2 no
2 x float dvec2 no
Tabl e 5.4. Example of type-matching vertex input variable types and vertex array attribute
types.
while the previous stage provides a dvec3, for example, then the two variables are
not using the same number of locations. Thus, the interfaces can’t possibly match.
Consequently, OpenGL requires double variables to be exactly the same type either
when assigning to attribute locations