venerdì 14 agosto 2015

Day 43: Fix and refactoring

Today I finally managed to fix all those things that were annoying me, and while the engine does just a few new things since yesterday, it's been one of the most productive days I recently had.

First I decided to move the shadow rendering on a new FBO, and leave the deferred rendering on the other one. It's not clear if this is more convenient than using one buffer for everything, but anywhay, it's a nice, logical division.

Then I finally fixed the problem with the depth texture, and now the shadow map is saved in the depth buffer, and uses only 16 bits, cutting the bandwidth in half.

Then i noticed that the engine didn't support objects that doesn't cast shadows, and to do so i had to change from scratch the Batch3D.
Actually I divided it in two, one for geometry rendering, the other for shadow rendering, and both inherits from an abstract one. This will  probably be useful when i'll need to write a 2D batch to render a GUI.

In the picture you can se a big shadow-casting pillar, and a circle of non shadow-casting spheres (with point lights inside them).

Nessun commento:

Posta un commento