INPUT vec4 aVertexColor;
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
INPUT float aVertexID;
#endif
#ifdef MORPH
uniform highp sampler2D sBlendShapeGeometry;
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
uniform int uBlendShapeGeometryWidth;
uniform int uBlendShapeGeometryHeight;
#endif
#ifdef SKINNING
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
#define MAX_BONES 80
uniform mat4 uBone[MAX_BONES];
#else
highp vec3 tangent = aTangent.xyz;
#ifdef MORPH
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
int width = uBlendShapeGeometryWidth;
#else
int width = textureSize( sBlendShapeGeometry, 0 ).x;
highp int blendShapeBufferOffset = 0;
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
highp float blendShapeWidth = float(uBlendShapeGeometryWidth);
highp float blendShapeHeight = float(uBlendShapeGeometryHeight);
highp float invertBlendShapeWidth = 1.0 / blendShapeWidth;
#ifdef MORPH_POSITION
// Calculate the index to retrieve the geometry from the texture.
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
vertexId = int(floor(aVertexID + 0.5)) + blendShapeBufferOffset;
y = vertexId / width;
x = vertexId - y * width;
highp float unnormalizeFactor = uBlendShapeUnnormalizeFactor[index];
#endif
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
highp float floatX = float(x) + 0.5;
highp float floatY = float(y) + 0.5;
diff = weight * unnormalizeFactor * ( texture2D( sBlendShapeGeometry, vec2(floatX * invertBlendShapeWidth, floatY * invertBlendShapeHeight) ).xyz - 0.5 );
#ifdef MORPH_NORMAL
// Calculate the index to retrieve the normal from the texture.
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
vertexId = int(floor(aVertexID + 0.5)) + blendShapeBufferOffset;
y = vertexId / width;
x = vertexId - y * width;
// Retrieves the blend shape normal from the texture, unnormalizes it and multiply by the weight.
if(0.0 != weight)
{
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
highp float floatX = float(x) + 0.5;
highp float floatY = float(y) + 0.5;
diff = weight * 2.0 * ( texture2D( sBlendShapeGeometry, vec2(floatX * invertBlendShapeWidth, floatY * invertBlendShapeHeight) ).xyz - 0.5 );
#ifdef MORPH_TANGENT
// Calculate the index to retrieve the tangent from the texture.
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
vertexId = int(floor(aVertexID + 0.5)) + blendShapeBufferOffset;
y = vertexId / width;
x = vertexId - y * width;
// Retrieves the blend shape tangent from the texture, unnormalizes it and multiply by the weight.
if(0.0 != weight)
{
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
highp float floatX = float(x) + 0.5;
highp float floatY = float(y) + 0.5;
diff = weight * 2.0 * ( texture2D( sBlendShapeGeometry, vec2(floatX * invertBlendShapeWidth, floatY * invertBlendShapeHeight) ).xyz - 0.5 );
highp vec4 positionV = uViewMatrix * positionW;
-#ifdef GLSL_VERSION_1_0
+#ifdef SL_VERSION_LOW
highp vec3 i0 = uViewMatrix[0].xyz;
highp vec3 i1 = uViewMatrix[1].xyz;
highp vec3 i2 = uViewMatrix[2].xyz;