The file source/blender/draw/engines/eevee/eevee_private.h
lists macro substitutions that match Eevee’s limitations (in particular, the MAX_LIGHT
macro sets the maximum allowed number of light sources, which is 128 now).
I would like to make a custom Blender build with the MAX_LIGHT
value increased to 2048. But changing the value directly only works when rendering is done on CPU. When using GPU, Blender crashes. How can I correctly raise this limit so that the build will work when rendering on GPU as well?
In the same file where this macro is defined there is a TODO task for calculation of MAX_LIGHT
with respect to UBO max size (find size by dividing UBO max size by light data size). Could anyone please guide me how and where to change the UBO size correctly? Maybe I can make the patch needed for TODO and at the same time figure out how to raise the limitation value I need in a custom build. (In this case, it doesn’t matter to me that the viewport might become unresponsive.)