Re: Can't Get Lighting to Work in Ardor3D
Posted by hedgehog on Mar 19, 2014; 4:57pm
URL: https://forum.jogamp.org/Can-t-Get-Lighting-to-Work-in-Ardor3D-tp4031971p4031983.html
In GridExample.initExample() if I replace the lines:
materialState.setAmbient(MaterialFace.FrontAndBack, new ColorRGBA(0.1f,0.1f,0.1f,1.0f));
materialState.setDiffuse(MaterialFace.FrontAndBack, new ColorRGBA(0.9f,0.9f,0.9f,1.0f));
with:
materialState.setColorMaterial(ColorMaterial.AmbientAndDiffuse);
materialState.setColorMaterialFace(MaterialFace.FrontAndBack);
then the red colour returns, just as if I commented out setting the light-state in ExampleBase.
Why is that?
However, I still don't have any lighting effects.