Hi. I currently have a rudimentary approach towards Cascade Shadow Mapping: 3 different cameras all passed to a shader. The “CSM” implementation I have works as we successfully have shadow’s quality switch based on what’s in the current lens frustum at the time.
However, I have one issue: all of the cameras are parented to a DirectionalLight node. I want all 3 cameras to follow the position of a node (the user, for instance). Directly reparenting the DirectionalLight to the user results in the rotation changing–so that’s not going to work. wrtReparenting the cameras to the user works, but the shadow tends to “jitter” (unrelated to shimmer, but like a violent jitter in the direction the user is moving and then around a frame later, back to where it’s supposed to be).
For context, I attached the lens to a node and an just using a posInterval on the node to move it. That often gets the jitter to work, but holding down the window and then re-releasing it causes a more violent shake of the shadow. The lens doesn’t shake, neither does anything else–it’s ONLY the shadow.
I’ve tried a few things to get this jittering to stop…even reading the forums to see things such as sync-video. I also tried to do setX/Y(node.getX/Y(render))
using taskMgr.add
, but that produced the same jitter effect. Perhaps a better word for this “jitter” would be some sort of delay of update on the shadow.
This shader and resulting code does have quite a bit into it, so I thought I would ask before creating a minimal reproducible program for this. I am using GLSL ver. 130 for reference. Not sure if this would have to do with any of my hardware, but please let me know if those are needed and I’ll get those ASAP.