You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ATM the lighting buffer is used both for rendering, and for mob spawning. When spawning mobs, a new lighting buffer is created covering the spawn radius for each player. Because there is only one lighting buffer stored in a global in the c-render, and it is reallocated if the newly created buffer is not the same size as the existing one, the lighting buffer is reallocated several times each frame. Once for the mob spawning, and once for the renderer.
Ideally we could have a more intelligent LightingBuffer storage which allows us to persist separate buffers of different sizes.
Another related issue is the duplicated work the mob lighting buffer creation and the renderer lighting buffer creation are doing when the regions overlap. (Also when multiple player's overlap.) Maybe we could store lighting buffers per chunk? Allowing us to generate lighting for all the chunks we need for mob spawning, then reusing those already generated chunks for rendering... Using a hash-table, this could be a lot more efficient.
The text was updated successfully, but these errors were encountered:
Depending on how expensive generating lighting buffers for the entire vertical height of a chunk is, we may need to split the "lighting-chunks" vertically too..?
ATM the lighting buffer is used both for rendering, and for mob spawning. When spawning mobs, a new lighting buffer is created covering the spawn radius for each player. Because there is only one lighting buffer stored in a global in the c-render, and it is reallocated if the newly created buffer is not the same size as the existing one, the lighting buffer is reallocated several times each frame. Once for the mob spawning, and once for the renderer.
Ideally we could have a more intelligent LightingBuffer storage which allows us to persist separate buffers of different sizes.
Another related issue is the duplicated work the mob lighting buffer creation and the renderer lighting buffer creation are doing when the regions overlap. (Also when multiple player's overlap.) Maybe we could store lighting buffers per chunk? Allowing us to generate lighting for all the chunks we need for mob spawning, then reusing those already generated chunks for rendering... Using a hash-table, this could be a lot more efficient.
The text was updated successfully, but these errors were encountered: