• ### Popular Now

• 11
• 9
• 11
• 9
• 11

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

## 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.

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

Edited by NekoCode