To avoid shadow acne I usualy use front face culling which works great. But for my current implementation the mesh is a quite complex terrain (depending on the lod level) and than the shading (dot product of the normals face with the negative light direction) is not always correct as some normals are actually facing the light. But still there is no information in the shadowmap to shadow these fragments in the shadowmap because of the front face culling ( like it is not exact enough). What I end up with, is that there are some bright spots in the shadowed area. I am not really sure why this does not work, because that would mean, that the front face culling is also culling some back faces, if the mesh has a very high level of detail, right?

with ff culling

without ff culling

In the Image with Front Face Culling (top picture) you can see these bright lines in the shadowed area where as without FF Culling (bottom image) the shadowed area is completely black.

My current workaround is, that I check the highest LOD level that is currently displaying and than according to that switch back an forth between ff culling and bias.

I use OpenGL:

The front face culling:


The shading in the fragment shader:

float shading = max(dot(normal,-lightDir), 0.0);
  • 1
    \$\begingroup\$ You need to provide some details, so someone can actually answer this. Images ( expected and what it looks now ), code that handles it. As its right now, its quite hard to answer. Edit your question to contain more details so you can get the answer. \$\endgroup\$ – Katu Feb 18 '16 at 12:07
  • \$\begingroup\$ I don't need any specific code review. I added images so and tried to explain it a little bit better. \$\endgroup\$ – Jodo Feb 19 '16 at 6:39

Your Answer

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

Browse other questions tagged or ask your own question.