How do I fix the anti-aliasing in edges of shadows in BGE?

image of bad shadow

  • $\begingroup$ shouldnt that be "Remove Aliasing from Shadows in the BGE" ? $\endgroup$ – blackdot Oct 11 '15 at 17:38

This can be solved relatively easily, but you may have to make minor changes elsewhere to keep the crisp shadow edge as pictured here, only without the anti-aliasing

This is the type of shadow that you have now.

A blue cube with a bad looking shadow

and I assume this is closer to what you want.

A blue cube with a softer, better looking shadow

You can achieve this simply be changing the shadow casting setting on your shadow emitting lamps from Simple to Variance

a gif showing the setting change

of course, now you can tweak the settings to restore the crisp shadow edge. I found that by squashing the Bias, the shadow looked much better.

a gif showing more settings changing to make the shadow look even better

You will need to make all your shadow lamps have the same settings for the final result to look good. It is usually a good idea to only have a few shadow lamps, one main lamp for everything, and then extra spotlights as needed. A better approach is baking on the shadows for the environment, and then use a spotlight parented to the character to give your character dynamic shadows.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.