I found an interesting GLSL Shadow.
The problem is, I have no clue how to use it inside jME
Please can somebody help me?
GLSL Shadow
http://rapidshare.com/files/223038034/Shadow_GLSL.rar.html
there is com.jme.renderer.pass.DirectionalShadowMapPass which uses a similar shader.
Ok I tried to use DirectionalShadowMapPass
ShadowRenderPass is more or less working…but I can't make the DirectionalShadowMapPass visible
init:
shadowMapPass = new DirectionalShadowMapPass(new Vector3f(3, 20, 3));
shadowMapPass.setViewDistance(5000);
shadowMapPass.add(rootNode);
pManager.add(shadowRenderPass);
update:
shadowMapPass.setViewTarget(cam.getLocation());
pManager.updatePasses(tpf);
render:
Renderer r = display.getRenderer();
// Clears the previously rendered information.
r.clearBuffers();
pManager.renderPasses(DisplaySystem.getDisplaySystem().getRenderer());
Have I forgotten something?
compare your set up with TestDirectionalShadowMapPass.
Already done
Also compared with ShadowShadeMapping
Can't imagine what I have forgotten…
Seems that you have not added occluders that is why there is no shadows. Occluders are nodes that cast the shadows.
shadowPass.addOccluder(occluderNode1);
shadowPass.addOccluder(occluderNode2);