[SOLVED] DirectionalLightShadowFilter causing pixelation of geometry edges

OK, I see. I hadn’t made the connection between the anti-aliasing setting and setNumSamples. Without calling setNumSamples, the FilterPostProcessor was effectively disabling anti-aliasing, which is why edges looked pixelated, just as they do when I use a DirectionalLightShadowRenderer and disable anti-aliasing. So, if I use a FilterPostProcessor, I need to call setNumSamples with the required anti-aliasing value, which is what nehon meant when he said “it’s not automatic”. Got it! :thumbsup:

It seems to me that at 2 numSamples, DirectionalLightShadowFilter is faster than DirectionalLightShadowRenderer with 2x anti-aliasing. However, at 16 numSamples, DirectionalLightShadowFilter is much slower than DirectionalLightShadowRenderer with 16x anti-aliasing. Is that normal, or does it depend on the graphics card?

Turns out this was because I had -enableassertions set. So, there must be an assertion in there somewhere (presumably in org.lwjgl.opengl.Util.checkGLError). However, if I remove -enableassertions, it seems to run OK, so, it would seem that whatever assert was failing was doing so unnecessarily.

Thanks for your help, guys. :thumbsup:

1 Like