Ver Fonte

* Fix issue where lighting shader would not compile when vertex lighting is used (due to recent HW skinning changes)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10561 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
ShA..Rd há 12 anos atrás
pai
commit
1f27804716
1 ficheiros alterados com 8 adições e 1 exclusões
  1. 8 1
      engine/src/core-data/Common/MatDefs/Light/Lighting.vert

+ 8 - 1
engine/src/core-data/Common/MatDefs/Light/Lighting.vert

@@ -135,10 +135,17 @@ vec2 computeLighting(in vec3 wvPos, in vec3 wvNorm, in vec3 wvViewDir, in vec4 w
 void main(){
    vec4 modelSpacePos = vec4(inPosition, 1.0);
    vec3 modelSpaceNorm = inNormal;
-   vec3 modelSpaceTan  = inTangent.xyz;
+   
+   #ifndef VERTEX_LIGHTING
+        vec3 modelSpaceTan  = inTangent.xyz;
+   #endif
 
    #ifdef NUM_BONES
+        #ifndef VERTEX_LIGHTING
         Skinning_Compute(modelSpacePos, modelSpaceNorm, modelSpaceTan);
+        #else
+        Skinning_Compute(modelSpacePos, modelSpaceNorm);
+        #endif
    #endif
 
    gl_Position = g_WorldViewProjectionMatrix * modelSpacePos;