Shadow glitching with boxes

I have a bunch of boxes, when I enable PSSM shadows, they glitch like so:

This happens not only when I add each box (with it’s own shadow mode) to a node and the node to the rootNode, but also when I use GeometryBatchFactory and give the optimized spatial a single shadow as well.


Spatial optimizedBoxes = GeometryBatchFactory.optimize(boxes);




Is this normal? Is it because I’m just using colours and no textures? The shadow on the ‘floor box’ below it seems perfect.

Source code:

you have to make sure that the PSSMShadowRenderer is before the FilterPostPorcessor in the processor queue.

Even with no FilterPostProcessor added, it still glitches.

I checked viewPort.getProcessors().size(), it is zero before I add the pssmRenderer.

If nothing is moving, the glitch is stationary, but still there. If the camera or the object moves, it flickers.

I’ll test your test case

1 Like

Thanks. The RtsCam class in case you don’t have it to hand -

I have noticed this happening on single cubes, much less visible than on the group of them though.