|
|
|
@ -32,6 +32,8 @@ |
|
|
|
#define out varying |
|
|
|
#define out varying |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Uniforms */ |
|
|
|
|
|
|
|
|
|
|
|
#ifdef EXPLICIT_UNIFORM_LOCATION |
|
|
|
#ifdef EXPLICIT_UNIFORM_LOCATION |
|
|
|
layout(location = 0) |
|
|
|
layout(location = 0) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
@ -62,6 +64,8 @@ uniform mediump mat3 textureMatrix |
|
|
|
; |
|
|
|
; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Inputs */ |
|
|
|
|
|
|
|
|
|
|
|
#ifdef EXPLICIT_ATTRIB_LOCATION |
|
|
|
#ifdef EXPLICIT_ATTRIB_LOCATION |
|
|
|
layout(location = POSITION_ATTRIBUTE_LOCATION) |
|
|
|
layout(location = POSITION_ATTRIBUTE_LOCATION) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
@ -78,8 +82,6 @@ in highp vec4 position; |
|
|
|
layout(location = TEXTURECOORDINATES_ATTRIBUTE_LOCATION) |
|
|
|
layout(location = TEXTURECOORDINATES_ATTRIBUTE_LOCATION) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
in mediump vec2 textureCoordinates; |
|
|
|
in mediump vec2 textureCoordinates; |
|
|
|
|
|
|
|
|
|
|
|
out mediump vec2 interpolatedTextureCoordinates; |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef VERTEX_COLOR |
|
|
|
#ifdef VERTEX_COLOR |
|
|
|
@ -87,8 +89,6 @@ out mediump vec2 interpolatedTextureCoordinates; |
|
|
|
layout(location = COLOR_ATTRIBUTE_LOCATION) |
|
|
|
layout(location = COLOR_ATTRIBUTE_LOCATION) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
in lowp vec4 vertexColor; |
|
|
|
in lowp vec4 vertexColor; |
|
|
|
|
|
|
|
|
|
|
|
out lowp vec4 interpolatedVertexColor; |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef INSTANCED_OBJECT_ID |
|
|
|
#ifdef INSTANCED_OBJECT_ID |
|
|
|
@ -96,8 +96,6 @@ out lowp vec4 interpolatedVertexColor; |
|
|
|
layout(location = OBJECT_ID_ATTRIBUTE_LOCATION) |
|
|
|
layout(location = OBJECT_ID_ATTRIBUTE_LOCATION) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
in highp uint instanceObjectId; |
|
|
|
in highp uint instanceObjectId; |
|
|
|
|
|
|
|
|
|
|
|
flat out highp uint interpolatedInstanceObjectId; |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef INSTANCED_TRANSFORMATION |
|
|
|
#ifdef INSTANCED_TRANSFORMATION |
|
|
|
@ -120,6 +118,20 @@ layout(location = TEXTURE_OFFSET_ATTRIBUTE_LOCATION) |
|
|
|
in mediump vec2 instancedTextureOffset; |
|
|
|
in mediump vec2 instancedTextureOffset; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Outputs */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef TEXTURED |
|
|
|
|
|
|
|
out mediump vec2 interpolatedTextureCoordinates; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef VERTEX_COLOR |
|
|
|
|
|
|
|
out lowp vec4 interpolatedVertexColor; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef INSTANCED_OBJECT_ID |
|
|
|
|
|
|
|
flat out highp uint interpolatedInstanceObjectId; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
void main() { |
|
|
|
void main() { |
|
|
|
#ifdef TWO_DIMENSIONS |
|
|
|
#ifdef TWO_DIMENSIONS |
|
|
|
gl_Position.xywz = vec4(transformationProjectionMatrix* |
|
|
|
gl_Position.xywz = vec4(transformationProjectionMatrix* |
|
|
|
|