O'Reilly logo

Mastering SFML Game Development by Raimondas Pupius

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Potential issues and how to address them

Although we aren't facing any of these issues at this very point, most 3D games will have to deal with them as soon as basic shadows are established using this method.

Shadow acne is a graphical artefact that can be summarized as horrible tearing, where lit areas are horribly defaced with dark and white lines closely nested together. This happens because shadow maps are of finite size and pixels that are right next to each other will end up spanning a small distance on actual, real geometry being shaded. It can be fixed by simply adding or subtracting a simple bias floating point value to or from the shadow map's depth sample inside the light pass shader. This floating point value would, ideally, not be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required