When I set the directionallight’s .shadow.mapSize.x and y, the shadow shrinks and shift… I can’t figure out how to fix it. The only value that looks correct is 512… If I set it to 256, it becomes smaller and offset from where it should be, and when I set it higher 1024, it become a square and offset…
I have scene.autoUpdate set to false- I wonder if there is something I need to update when I set the mapSize… or how I can solve it.
edit: Three.JS gyakorlás 001 - JSFiddle - Code Playground
here is a jsfiddle showing the issue. I used someone else’s fiddle and modified it so that the scene.autoUpdate is false, and then changed the mapSize in the render loop. You can see how the shadow looks shrunken and offset.