Jump to content
  • Advertisement
Sign in to follow this  
NekoCode

Cascaded shadow map cutting

This topic is 1013 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Good day everyone! I am following Nvidia's CSM demo code, I got it working great, but I noticed that if I move a bit far away shadow splits start to work "inverted" ( i.e. not applying a split, but removing it ), here's video ( Gyazo ):

https://i.gyazo.com/595aff92b3b0a989362c24cec6351b95.mp4

 

I even made code the same as Nvidia's code, but this artifact won't go away. 

My camera setup:

fov= 65.0f

near = 0.1 ( 1.0 for shadow )

far = 3000

 

I tried to transpose light view matrix, but it results the same problem.

I am generating "LookAt" matrix using the following code:

 
mLightView = ncMatrix4x4::LookAt( SVec3(0.0f), SVec3(-DirL.x, -DirL.y, -DirL.z ), SVec3(.0f, 1.0f, 0.0f) ) ;//DirL * dist, Lighttarget, Lightup);
 

"LookAt" method is fine. Could someone tell me what I am doing wrong if someone faced similar problem?

 

I can upload the whole code here, but it's 99.9% same as Nvidia's code.

Thanks in advance!

 

EDIT: As I have noticed, shadow disappears only on first lod:

db043889348803c8194dce57f9b95528.png

Edited by NekoCode

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!