Multiple Render Target
As I said in a previous post I have been working with Multiple Render Target as a test and I have been able to get a working sample based on the Shadow Mapping tutorial.
It means instead of rendering the whole geometry multiple times (1 time per light + 1 final render) it is only rendered once (and position & colors are saved in this step to two separate textures).
It turns out that with the tutorial sample this method is actually slower, as time gained in shadow mapping and render phases is lower than time needed to build the G-buffer.
But if the geometry is more complex (tested by duplicating the scene 25 times) then it becomes quicker.
So I think I will create a part 5 of my tutorial soon with MRT (or maybe two parts, part 5 being some cleaning and part 6 being MRT), this part will be desktop only as it needs to call some Lwjgl functions directly.
But I don’t know if I will actually use that in my next engine, the scene has to become fairly complex for it to becomes useful (or I need to find some ways to optimize that).