martedì 21 novembre 2017

Day 207: Improvements to tiled deferred rendering

Today I cleaned the code of the tiled deferred shader.
For example I noticed that shading each light on the compute shader would cause a new sampling of all textures in the gbuffer. So I wrote a function to sample them, build the relevant information, save them into a structure, and reuse them for lights calculation. This didn't massively help performance, probably because cache was already taking care of it, but I noticed some improvements.

Then I noticed that the technique runs at 55 fps with 2500 lights with 32x32 grid size, while it drops to 16 fps at 16x16 size. I suspect that bad latency-hiding is the cause, but running the program on Intel gets a better performance, so it might be a problem with the Nvidia driver. I'm still investigating the issue.

I also tried RenderDoc to profile the shader, and while it doesn't do real-time profiling (I think, didn't look too much into it yet), it is a great tool to analyze a single frame of rendering.

Nessun commento:

Posta un commento