Hi guy,
I have a very large scene(2541 meshes) and I wrote a bit of code to loop through the meshes array and get specific meshes(Oak trees) so that they could be pushed into the shadows render list, however the shadows quality is very poor...see image.
This is the code for my shadowGenerator, as you can see I just want simple shadows no need for ESM or blurred shadows of any kind.
var shadowGenerator = new BABYLON.ShadowGenerator(8192, sunLight);
for(var i = 0; i < scene.meshes.length; i++){
if(scene.meshes.name.includes("oak")){
var tree = scene.meshes;
shadowGenerator.getShadowMap().renderList.push(tree);
}
}
The issue seems to be shadowMap related and I truly don't know what to do about it. In some areas of my level the trees don't even seem to cast a shadow as if they were outside of the light's view. If you guys have any tips or ideas I'd appreciate the help a lot.