giovedì 16 novembre 2017

Day 203: SSBO for all lights, and point lights tiled rendering in progress

Today I started to implement compute shaders for point and spot lights as well (although I didn't finish the latter yet).
As soon as the point lights were working, I noticed a bad performance issue with UBOs. Basically I was sending an UBO for each different light, and this was not good for performance. So i decided to use an SSBO instead. I wa already using one for the compute shader, now I'm using another one for the normal lights. Depending on whether a light has shadows, its information are added to either SSBO.

At the end of the day, I managed to have dir and point lights working. Since point lights don't have any culling yet, the scene with 1000 point light is running at ~5 fps, but I expect it to become extremely fast after culling is done.

Nessun commento:

Posta un commento