Skip to main content
added 2 characters in body
Source Link
joojaa
  • 8.5k
  • 1
  • 25
  • 48

enter image description here

Image 1: A bad case of shadow acne. (Synthetic and a bit exagaratedexaggerated)

Shadow acne is caused by the discrete nature of the shadow map. A shadow map is composed of samples, a surface is continuous. Thus, there can be a spot on the surface where the discrete surface is closerfurther than the sample. The problem does persist even if you multi sample, but you can sample smarter in ways that can nearly eliminate this at significant cost.

enter image description here

Image 2: A side cutaway of a shadow function and its discrete samples.

The canonical way to solve this is to offset the shadow map slightly so the object no longer self shadows itself. This offset is called a bias. One can use more smart offsets than just a fixed value but a fixed value works quite well and has minimal overhead.

enter image description here

Image 3: Shadow function biased (offset) forward.

enter image description here

Image 1: A bad case of shadow acne. (Synthetic and a bit exagarated)

Shadow acne is caused by the discrete nature of the shadow map. A shadow map is composed of samples, a surface is continuous. Thus, there can be a spot on the surface where the discrete surface is closer than the sample. The problem does persist even if you multi sample, but you can sample smarter in ways that can nearly eliminate this at significant cost.

enter image description here

Image 2: A side cutaway of a shadow function and its discrete samples.

The canonical way to solve this is to offset the shadow map slightly so the object no longer self shadows itself. This offset is called a bias. One can use more smart offsets than just a fixed value but a fixed value works quite well and has minimal overhead.

enter image description here

Image 3: Shadow function biased (offset) forward.

enter image description here

Image 1: A bad case of shadow acne. (Synthetic and a bit exaggerated)

Shadow acne is caused by the discrete nature of the shadow map. A shadow map is composed of samples, a surface is continuous. Thus, there can be a spot on the surface where the discrete surface is further than the sample. The problem does persist even if you multi sample, but you can sample smarter in ways that can nearly eliminate this at significant cost.

enter image description here

Image 2: A side cutaway of a shadow function and its discrete samples.

The canonical way to solve this is to offset the shadow map slightly so the object no longer self shadows itself. This offset is called a bias. One can use more smart offsets than just a fixed value but a fixed value works quite well and has minimal overhead.

enter image description here

Image 3: Shadow function biased (offset) forward.

Source Link
joojaa
  • 8.5k
  • 1
  • 25
  • 48

enter image description here

Image 1: A bad case of shadow acne. (Synthetic and a bit exagarated)

Shadow acne is caused by the discrete nature of the shadow map. A shadow map is composed of samples, a surface is continuous. Thus, there can be a spot on the surface where the discrete surface is closer than the sample. The problem does persist even if you multi sample, but you can sample smarter in ways that can nearly eliminate this at significant cost.

enter image description here

Image 2: A side cutaway of a shadow function and its discrete samples.

The canonical way to solve this is to offset the shadow map slightly so the object no longer self shadows itself. This offset is called a bias. One can use more smart offsets than just a fixed value but a fixed value works quite well and has minimal overhead.

enter image description here

Image 3: Shadow function biased (offset) forward.