From 83ddf9d7c3f87ca352d67705d36744867a4c253c Mon Sep 17 00:00:00 2001 From: shadowislord Date: Wed, 18 Mar 2015 23:15:11 -0400 Subject: [PATCH] TestCartoonEdge: more reliable way to detect lighting material --- jme3-examples/src/main/java/jme3test/post/TestCartoonEdge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-examples/src/main/java/jme3test/post/TestCartoonEdge.java b/jme3-examples/src/main/java/jme3test/post/TestCartoonEdge.java index 1ca328a8a..ff6ab497f 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestCartoonEdge.java +++ b/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);