[Solved] ShadowMode CastAndReceive

Hi,
when I set the shadow mode to CastAndReceive I get a strange (for me) translucent effect:

setShadowMode(RenderQueue.ShadowMode.CastAndReceive);

image

setShadowMode(RenderQueue.ShadowMode.Off);
image

Is this how its supposed to work?

Don’t know if its relevant, but this is how i use the shadow filter:

final private static int _shadowMapSize = 4096;
final private static int _shadowMapSplits = 3;
final private static boolean _useShadowFilter = true
if (_useShadowFilter) {
            DirectionalLightShadowRenderer dlsr;
            dlsr = new DirectionalLightShadowRenderer(assetManager,
                    _shadowMapSize, _shadowMapSplits);
            dlsr.setEdgeFilteringMode(EdgeFilteringMode.PCF8);
            dlsr.setLight(_sun);
            viewPort.addProcessor(dlsr);
        }

make sur the Shadow renderer is added before the FilterPostProcessor

2 Likes

Thanks! Now its working

1 Like