The shadows look better. And it's meant to work like ShadowHelper.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu//In the game loop:
shadows.setCenter(batman.model.get(0).getTransformedCenter());
shadows.updateShadowMap(theWorld, buffer, camera);
//The setup:
private void setupShadows() {
shadows = new ShadowMapper(1024);
shadows.setLightDirection(new SimpleVector(.2f, .4f, -.3f));
shadows.setShadowArea(360f);//120f
shadows.setShadowBias(0.00f);
shadows.setShadowDarkness(0.50f);
shadows.setCenter(batman.model.get(0).getTransformedCenter());
// ALL visible objects must be casters
for (Object3D part : batman.model)
shadows.addCaster(part);
shadows.addCaster(batman.cape);
for (Object3D part : joker.model)
shadows.addCaster(part);
shadows.addCaster(catwoman);
shadows.addCaster(batmobile.hull);
shadows.addCaster(grappleTarget);
shadows.addReceiver(ground);
for (Object3D obj : cityObjects)
shadows.addReceiver(obj);
}
// After you have moved the camera or otherwise changed the viewport size:
GL11.glDisable(GL11.GL_SCISSOR_TEST); // make sure the old scissor is gone
GL11.glViewport(0, 0, canvas.getWidth(), canvas.getHeight());
GL11.glEnable(GL11.GL_SCISSOR_TEST); // re‑enable with the *new* dimensions
GL11.glScissor(0, 0, canvas.getWidth(), canvas.getHeight());
fullScreenOverlay = new Overlay(theWorld, 0, 50, (int)(buffer.getWidth()), (int)(buffer.getHeight()-50), "FullInterface");
fullScreenOverlay.setTransparencyMode(Object3D.TRANSPARENCY_MODE_DEFAULT);
fullScreenOverlay.setTransparency(250);
Page created in 0.015 seconds with 13 queries.