I made a scene with a directional light, a plane receiving light, and a set of meshes that cast light.
The meshes are created dynamically and created and destroyed very often.
The more meshes I create and set their castShadows = true, the more my VRAM is getting filled. Eventhough I dispose the geometry, texture and material after removing the recent mesh.
This is done in order to play volumetric videos.
There is no memory leak if I do not enable shadow maps.
Is there something I am missing and not disposeing?
I am using MeshBasicMaterial for the dynamic meshes.
I set the renderer shadowMap.enable = true、light castShadow = true、object the castShaow and receiveShadow as true. when i dispose the geometry, texture and m eterial, the memory is not released.