Parcourir la source

TestCartoonEdge: more reliable way to detect lighting material

shadowislord il y a 10 ans
Parent
commit
83ddf9d7c3

+ 1 - 1
jme3-examples/src/main/java/jme3test/post/TestCartoonEdge.java

@@ -80,7 +80,7 @@ public class TestCartoonEdge extends SimpleApplication {
         }else if (spatial instanceof Geometry){
             Geometry g = (Geometry) spatial;
             Material m = g.getMaterial();
-            if (m.getMaterialDef().getName().equals("Phong Lighting")){
+            if (m.getMaterialDef().getMaterialParam("UseMaterialColors") != null) {
                 Texture t = assetManager.loadTexture("Textures/ColorRamp/toon.png");
 //                t.setMinFilter(Texture.MinFilter.NearestNoMipMaps);
 //                t.setMagFilter(Texture.MagFilter.Nearest);