Hello, im making shadows, light.shadow.camera.height i think it would be called?, depends of the following on the image:
i want to increase that, what i indicate up there in white
As you can see in the following image, my shadow is cutoff because this:
I played with light.shadow.camera properties, but that doesnt solve my problem, light.position.x/y/z doesnt solve it either
Sorry if im not explaining well, you got the images, im available if you have any questions
Thanks!
directionalLight.shadow.camera.far = 1000;
directionalLight.shadow.camera.updateProjectionMatrix();
ohh i feel dumb haha, well thanks it worked!!!
if you need to increase the coverage area.. you can scale .left,right,top,bottom of the shadow.camera, followed by updateProjectionMatrix()
Yes, that might be an even better alternative than increasing the light height because the shadow resolution can degrade as height increases. If the OP creates an internal view, he might want to use a light that is only a few meters away.
I think with a directionalLight it doesn’t matter, since its camera is orthographic. For a spotlight (perspectivecamera) tho, that is very true.
I was referring to directional lights. However, what you say makes sense. One factor may be that I have been using WebGPU which used to have problems with shading. I tried to get a side by side comparison. Although there were still some differences, it appears that WebGPU may have now been improved to the point that the differences are negligible.
Ah I see what you meant. Yes you do lose some shadow depth precision by increasing the far. You can also increase the near to compensate for that a bit.. also adjusting the .bias.