Przeglądaj źródła

fixed a bug with normals in TerrainLighting material

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7796 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
bre..ns 14 lat temu
rodzic
commit
8c7469d210

+ 1 - 1
engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.frag

@@ -648,7 +648,7 @@ void main(){
     //---------------------
     // normal calculations
     //---------------------
-    #if defined(NORMALMAP) || defined(NORMALMAP_1) || defined(NORMALMAP_2) || defined(NORMALMAP_3)
+    #if defined(NORMALMAP) || defined(NORMALMAP_1) || defined(NORMALMAP_2) || defined(NORMALMAP_3) || defined(NORMALMAP_4) || defined(NORMALMAP_5) || defined(NORMALMAP_6) || defined(NORMALMAP_7) || defined(NORMALMAP_8) || defined(NORMALMAP_9) || defined(NORMALMAP_10) || defined(NORMALMAP_11)
       #ifdef TRI_PLANAR_MAPPING
         vec3 normal = calculateNormalTriPlanar(wNormal, wVertex, texCoord);
       #else

+ 1 - 1
engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.vert

@@ -61,7 +61,7 @@ void main(){
     //--------------------------
     // specific to normal maps:
     //--------------------------
-    #if defined(NORMALMAP) || defined(NORMALMAP_1) || defined(NORMALMAP_2) || defined(NORMALMAP_3)
+    #if defined(NORMALMAP) || defined(NORMALMAP_1) || defined(NORMALMAP_2) || defined(NORMALMAP_3) || defined(NORMALMAP_4) || defined(NORMALMAP_5) || defined(NORMALMAP_6) || defined(NORMALMAP_7) || defined(NORMALMAP_8) || defined(NORMALMAP_9) || defined(NORMALMAP_10) || defined(NORMALMAP_11)
       vec3 wvTangent = normalize(g_NormalMatrix * inTangent.xyz);
       vec3 wvBinormal = cross(wvNormal, wvTangent);