Fix Scene3D shader cache miss
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / internal / graphics / shaders / default-physically-based-shader.vert
index ea4fd32..238ad20 100644 (file)
@@ -20,22 +20,26 @@ in vec4 aTangent;
 in vec3 aTangent;
 #endif
 
+#ifdef COLOR_ATTRIBUTE
 in vec4 aVertexColor;
+uniform lowp float uHasVertexColor;
+#endif
 
 #ifdef MORPH
   uniform highp sampler2D sBlendShapeGeometry;
 #endif
 
-out vec2 vUV;
+out mediump vec2 vUV;
 out lowp mat3 vTBN;
+#ifdef COLOR_ATTRIBUTE
 out lowp vec4 vColor;
+#endif
 out highp vec3 vPositionToCamera;
 
 uniform highp mat4 uViewMatrix;
 uniform mat3 uNormalMatrix;
 uniform mat4 uModelMatrix;
 uniform mat4 uProjection;
-uniform lowp float uHasVertexColor;
 
 #ifdef SKINNING
   in vec4 aJoints;
@@ -160,7 +164,9 @@ void main()
   vUV = aTexCoord;
 #endif
 
+#ifdef COLOR_ATTRIBUTE
   vColor = mix(vec4(1.0f), aVertexColor, uHasVertexColor);
+#endif
 
   gl_Position = uProjection * positionV;
 }