I have a slight problem with the ShadowGenerator. The shadow map, with a fixed size, stretches itself to render on all the meshes in it’s renderlist giving ultra low quality shadows:
which is understandable.
So I tried to make a workaround, by placing LOD ShadowGenerators and switching meshes in their render list based on their distance to the player, but of course all the shadowgenerators need a way of finding meshes outside their shadow map to cast shadows so I used this on every mesh while testing on just one shadow gen:
this.mesh.receiveShadows = true; game.shadowGenerator.addShadowCaster(this.mesh);
and using this code to switch them:
However, addShadowCaster also adds the mesh to the renderlist, I thought it was just meant to recognize it as something that cast shadows, even if you comment out that switch code it still renders shadows on the shadow caster. Maybe I’m missing something or typing something wrong but I need help.