Application and shadowRenderPass

My application is not extending any Game type nor Pass type.



Everything works fine, now I'm trying to apply shadows, this is the code :



on initialization :


sPass = new ShadowedRenderPass();
DisplaySystem.getDisplaySystem().setMinStencilBits(8);      
sPass.setRenderShadows(true);

sPass.setEnabled(true);
sPass.setRenderVolume(false);
sPass.setLightingMethod(ShadowedRenderPass.ADDITIVE);



during game (while update and render cicles are running) objects are added to shadows or occluders

my render cycle :


DisplaySystem.getDisplaySystem().getRenderer().draw(scene);
DisplaySystem.getDisplaySystem().getRenderer().renderQueue();
sPass.renderPass(DisplaySystem.getDisplaySystem().getRenderer());



my update cycle :


physicsSpace.update(interpolation);
sPass.updatePass(interpolation);      
scene.updateGeometricState(interpolation, true);            
scene.updateRenderState();



The light is set to cast shadow

The result is :
the terrain(shadow) is darker and the player(shadow and occluder) is darker too.

But no shadow is visible on terrain.

Other strange thing is :
if I set volume to on the volume rendered is bright green.

Help, please.

Oh yes, thanks to everybody, minstencilbits must be setted first of all.



Thanks to the 30 whom readed this.