Lighting memory leak

This is a wierd one, earlier this was mostly fine, although when I changed cameras to f4 it would rebuild the shaders everytime (is this a shadow map thing?) I then started to try out some different lighting, disconnected the old ones and added a couple of new lights, hitting f4 now eats memory very quickly. It seems that it is leaving the lights dissconected that does this. Delete them, and it works as expected. Do you see this? How to best deal with different lighting setups?

.Example Layers - Day and Night EarthLights.vl (109.1 KB)

I cached lights that aren’t changing over time and it seems to improve performance considerably and prevent memory leaks, but I haven’t tested whether they are disposed or whether the object materials need to be recompiled. I did it over a bunch of lights and the group node that joined them for the scene, but you may get similar results caching each individual one, and setting the ‘Dispose’ pin to true

1 Like