directxdirectx-11shadow-mappingculling

DirectX 11 front face culling does not cull front faces in shadow map


I try to implement shadow mapping (CSM) on DirectX 11 and succeeded to get a prototype working. Right now I have drawn the geometry using back face culling in the shadow map pass but I now want to switch to front face culling to further reduce shadow acne.

Switching to front face culling does not change anything though. After an in-depth analysis using Visual Studio Graphics Debugger I am now stuck.

Graphic Debugger says that the rasterization state is set correctly.

enter image description here

But the depth values in the shadow map seems to not change a bit.

enter image description here

In my understanding front/back face culling is applied before the depth values are written to the depth buffer.

Where I'm going wrong? Is there any special behavior when rendering into the depth buffer without having a render target view but only a depthstencil view attached to the output merger?


Solution

  • In fact the model had an inner hull because the model loader (for Sketchup files) added each face of the modell with an inner and an outer face.

    Thanks for the comment and pointing out!