Browse Source

Change trigger for USE_TEXTURE_ARRAYS define

Removes the UseTextureArrays boolean, and instead map the define to the AlbedoTextureArray. This should be a cleaner way to do it that the define doesn't rely on users going back and setting a boolean on old terrain mats, and gives less chance to accidentally break the shader if the boolean value is cleared by mistake for some reason.
Ryan McDonough 6 months ago
parent
commit
db5b9f00b1

+ 1 - 4
jme3-terrain/src/main/resources/Common/MatDefs/Terrain/AdvancedPBRTerrain.j3md

@@ -266,9 +266,6 @@ MaterialDef AdvancedPBRTerrain {
 
 
         // Alpha threshold for fragment discarding
         // Alpha threshold for fragment discarding
         Float AlphaDiscardThreshold (AlphaTestFallOff)
         Float AlphaDiscardThreshold (AlphaTestFallOff)
-
-        //do not change this or AdvancedPBRTerrain will break
-        Boolean UseTextureArrays : true 
     }
     }
 
 
     Technique {
     Technique {
@@ -382,7 +379,7 @@ MaterialDef AdvancedPBRTerrain {
 
 
             DEBUG_VALUES_MODE : DebugValuesMode
             DEBUG_VALUES_MODE : DebugValuesMode
 
 
-            USE_TEXTURE_ARRAYS : UseTextureArrays
+            USE_TEXTURE_ARRAYS : AlbedoTextureArray
         }
         }
     }
     }