I am noticing rendering issues with the DirectionalLightShadowFilter when I have large values in my x and z coordinates. The rendering issues go away if I “normalise” my coordinates so they are closer to 0.
As an example of “large coordinates” I mean x=14500 and z=75000.
If I rerender the exact same scene, but shifting my coordinates so that x=1100 and z=4600, the rendering issues go away.
If I turn off the DirectionalLightShadowFilter, or use a DirectionalLightShadowRenderer instead, the issues go away.
The “issues” I am reporting are as follows:
- Small changes in the direction of the camera results in large changes to the shadows. These changes seem to cycle (i.e. if I slowly move the camera from right to left, the shadows go through a few different states then return to the original state)
- I can see square “tiling” of the shadows. I think these match the shape of the meshes in the scene (I am using the Blocks framework, which creates square meshes)
I have attached some screenshots that attempt to show the issue. I have shown the same scene viewed from slightly different angles, and you can see the shadows are rendering very differently. You can also see the “tiling” effect I was describing.
Another screenshot shows the same scene, with coordinates reduced so that the issue does not appear.
- Use DirectionalLightShadowRenderer instead of DirectionalLightShadowFilter. The DirectionalLightShadowRenderer does not give the right look for my application, whereas DirectionalLightShadowFilter does (when I have smaller coordinates)
- Use smaller Coordinates. My World is quite large, so if I “normalise” one part of the world to render correctly, then other parts of the World will get this issue instead.