I have a mesh which I generate for my terrain, but shadows look weird, like this:
Also, when I generate the tangent thingies, I get lots of warnings about Angle between tangets exceeds tolerance for vertex X.
Where should I look to find the problem? the triangles? normals?
I’ll paste code if needed, thanks in advance.
Edit
Oh and I have a single DirectionalLight and a DirectionalLightShadowRenderer, with size of 2048 and nbSplits set to 3. EdgeFilteringMode is set to PCF4.
Does the problem go away if you don’t have DirectionalLightShadowRenderer?
If not then it looks like bad normals to be… either way your normals might be bad unless your directional light is pointing straight down. Because that terrain looks pretty unshaded.
Actually normals don’t affect shadows, so fixing thme may not solve your issue.
I see you have a FIlterPostProcessor too, make sure the ShadowRenderer is added before it.
You can ignore the tangent generation warning, it’s unrelated to your issue.
That’s why I qualified the response… if it’s not related to shadow rendering then it’s definitely bad normals… and since it already looks like there are bad normals anyway, it was worth mentioning.
Edit: that being said, from the zoomed in image, the artifacts do look like something the shadow renderer would do. I wonder where the light is because it’s hard to tell because there is no shading at all.