mercoledì 1 luglio 2015

Day 19: Giga Refactoring

Today i started by finding a problem which was killing the performances of the deferred rendering.

Basically i was using a bounding box for the ligths which was 255 times bigger than the correct size.

Now i can look at 121 lights on screen and 400 cubes with ~30 fps (image), which is pretty good for my card.

The same scene with 50 lights runs at 60 fps.

Then I created a DeferredRenderer class which handles all the important steps instead of having everything in a single enormous function. It tooks me quite a lot of times because i needed to refactor other things to make everything work together.

Tomorrow i'll make better PointLight and DirectionalLight classes, with additional stuff, like specular color etc..


Nessun commento:

Posta un commento