ソースを参照

Merge pull request #1456 from duncanj/fix-lighting-shader-compile-error-with-instancednode-and-fog

Fix for lighting vertex shader when used with Fog and InstancedNode.
Paul Speed 4 年 前
コミット
1480c15aa0

+ 1 - 1
jme3-core/src/main/resources/Common/MatDefs/Light/Lighting.vert

@@ -186,6 +186,6 @@ void main(){
     #endif
 
     #ifdef USE_FOG
-    fog_distance = distance(g_CameraPosition, (g_WorldMatrix * modelSpacePos).xyz);
+    fog_distance = distance(g_CameraPosition, (TransformWorld(modelSpacePos)).xyz);
     #endif
 }