June 2013
Beginner
352 pages
9h 5m
English
From the point of view of a 3D engine, shading and lighting are two separate things. You may have noticed that, by default, our walls, bricks, and cannon balls don't cast drop shadows onto the floor or on each other.
This is how you can activate drop shadows using a SceneProcessor:
Main.java and name the class ShadowDirectional.java. Remember to also refactor the first line of the main() method to ShadowDirectional app = new ShadowDirectional().public void simpleInitApp() {
DirectionalLight sun = new DirectionalLight();
sun.setDirection(new Vector3f(.3f, -0.5f, -0.5f));
rootNode.addLight(sun);DirectionalLightShadowRenderer object ...Read now
Unlock full access