* 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
3.0
ShA..Rd 12 years ago
parent 198adb0753
commit 1f27804716
  1. 7
      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(){ void main(){
vec4 modelSpacePos = vec4(inPosition, 1.0); vec4 modelSpacePos = vec4(inPosition, 1.0);
vec3 modelSpaceNorm = inNormal; vec3 modelSpaceNorm = inNormal;
#ifndef VERTEX_LIGHTING
vec3 modelSpaceTan = inTangent.xyz; vec3 modelSpaceTan = inTangent.xyz;
#endif
#ifdef NUM_BONES #ifdef NUM_BONES
#ifndef VERTEX_LIGHTING
Skinning_Compute(modelSpacePos, modelSpaceNorm, modelSpaceTan); Skinning_Compute(modelSpacePos, modelSpaceNorm, modelSpaceTan);
#else
Skinning_Compute(modelSpacePos, modelSpaceNorm);
#endif
#endif #endif
gl_Position = g_WorldViewProjectionMatrix * modelSpacePos; gl_Position = g_WorldViewProjectionMatrix * modelSpacePos;

Loading…
Cancel
Save