Shadows are not aligned with the corresponding objects

I’m trying to use shadows with the setShadowCaster function in DirectionalLight, but I’m getting strange results. Below is what they look like as its direction changes. You can see that the shadows are not aligned with the corresponding objects, especially for the objects in the bottom-left. What might be the problem?
Peek 2021-06-14 00-42

Could be that the models are a little off the ground.

I just checked but that doesn’t seem to be the problem.

The shadows were rendered correctly when I disabled SSAO, so it seems to do with something related to that.

Enabling any filter through CommonFilters seems to create this problem.
I’m using a class that inherits ShowBase and using filters = CommonFilters(self.win, self.cam) in the constructor.

I found this issue, and following it fixed my problem :slight_smile:

1 Like