After hours of work I suddenly realized that it is absolutely useless, because while each light could eventually be batched with other ones, each one of them requires a different shadow texture. For this obvious reason, which somehow i failed to see before, a batch is absolutely useless, because each model requires a single draw call.
So in the end I will use the SimpleDrawer class to render each light, but I'll probably modify that to handle a variety of different shaders.
The actual, useful job I did today is limited to the refactoring of a few functions (which i copied and pasted instead of "templatize" them), and the fact that now the light shader is hold by each light instead of the deferred renderer, which is the first step in order to automatize this process as well.
Nessun commento:
Posta un commento