Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 15

Thread: CSM / PSSM - Depth comparison

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Quote Originally Posted by Silverlan View Post
    Everything up until 00:12 is using a static bias of 0.001. It looks alright, but can lead to unpredictable artifacts if I change the light direction.
    At 00:12, I've switched to a slope bias, which I'm using for spot-light-sources as well:
    Code :
    float bias = 0.001 *tan(acos(cosTheta));
    'cosTheta' being the dot product between the vertex normal and the light direction.
    So... Let's suppose the light and normal are aligned. This will results in 0 bias. Which may help explain why you seem to be getting really bad self-shadowing artifacts (I assume you are casting light-space front-faces into the shadow map).

    You might look into some other techniques, such as Normal Offset Shadows (just websearch for it). In my experience, it seems to perform better.

    And before you trip over some "incomplete" info on the net that says casting back-faces is the solution, take a look at this.
    Last edited by Dark Photon; 01-18-2015 at 12:14 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts