|
|
|
@ -29,31 +29,41 @@ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef EXPLICIT_UNIFORM_LOCATION |
|
|
|
#ifdef EXPLICIT_UNIFORM_LOCATION |
|
|
|
layout(location = 0) uniform mat4 transformationMatrix; |
|
|
|
layout(location = 0) |
|
|
|
layout(location = 1) uniform mat4 projectionMatrix; |
|
|
|
#endif |
|
|
|
layout(location = 2) uniform mat3 normalMatrix; |
|
|
|
|
|
|
|
layout(location = 3) uniform vec3 light; |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
uniform highp mat4 transformationMatrix; |
|
|
|
uniform highp mat4 transformationMatrix; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef EXPLICIT_UNIFORM_LOCATION |
|
|
|
|
|
|
|
layout(location = 1) |
|
|
|
|
|
|
|
#endif |
|
|
|
uniform highp mat4 projectionMatrix; |
|
|
|
uniform highp mat4 projectionMatrix; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef EXPLICIT_UNIFORM_LOCATION |
|
|
|
|
|
|
|
layout(location = 2) |
|
|
|
|
|
|
|
#endif |
|
|
|
uniform mediump mat3 normalMatrix; |
|
|
|
uniform mediump mat3 normalMatrix; |
|
|
|
uniform highp vec3 light; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef EXPLICIT_UNIFORM_LOCATION |
|
|
|
|
|
|
|
layout(location = 3) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
uniform highp vec3 light; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef EXPLICIT_ATTRIB_LOCATION |
|
|
|
#ifdef EXPLICIT_ATTRIB_LOCATION |
|
|
|
layout(location = POSITION_ATTRIBUTE_LOCATION) in highp vec4 position; |
|
|
|
layout(location = POSITION_ATTRIBUTE_LOCATION) |
|
|
|
layout(location = NORMAL_ATTRIBUTE_LOCATION) in mediump vec3 normal; |
|
|
|
#endif |
|
|
|
#else |
|
|
|
|
|
|
|
in highp vec4 position; |
|
|
|
in highp vec4 position; |
|
|
|
in mediump vec3 normal; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef EXPLICIT_ATTRIB_LOCATION |
|
|
|
|
|
|
|
layout(location = NORMAL_ATTRIBUTE_LOCATION) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
in mediump vec3 normal; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef TEXTURED |
|
|
|
#ifdef TEXTURED |
|
|
|
#ifdef EXPLICIT_ATTRIB_LOCATION |
|
|
|
#ifdef EXPLICIT_ATTRIB_LOCATION |
|
|
|
layout(location = TEXTURECOORDINATES_ATTRIBUTE_LOCATION) in mediump vec2 textureCoords; |
|
|
|
layout(location = TEXTURECOORDINATES_ATTRIBUTE_LOCATION) |
|
|
|
#else |
|
|
|
|
|
|
|
in mediump vec2 textureCoords; |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
in mediump vec2 textureCoords; |
|
|
|
|
|
|
|
|
|
|
|
out mediump vec2 interpolatedTextureCoords; |
|
|
|
out mediump vec2 interpolatedTextureCoords; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|