This is a demo was created in my own custom engine using c++ and DirectX11. This demo showcases my Tiled Deferred Renderer.
As you seen in the video above the tiled deferred rendering implementation allows my engine to render an insane amount of lights while maintaining 60 FPS. In the video I cap out at 10,0000 point lights at 60 FPS. We reduce texture fetches in the tiled method by switching from sampling per light for every pixel in a normal deferred renderer to sampling once per pixel and then iterating over all lights within a specific tile to compute the final color. All though rendering shadows now become a little more complicated due to the fact that we cant reuse shadow maps. This can be fixed by creating a big resolution shadow map texture and then proceed to give small sections of that texture to a light casting shadow. Note that when rendering an insane amount of lights you can not do it all in one pass. Compute shaders have a limited amount of thread group shared memory. Once this gets to big you will see performance dip. So we have to break down the lighting pass into multiple passes. For example, when rendering 10,000 lights, we can break it down such that 10,000 / 1024 = 9.78 = 10. This means that to render that high amount of lights we require 10 passes through the tiled lighting. This is very important and 1024 is just an example value. You could go higher but all depends on what works best and this you have to play with.
Implementing this into my pipeline was really fun and rewarding. In the near future I will be putting a tiled forward implementation to get alpha support. Tiled forward and deferred can easily be used together. Hope you enjoy.
I would highly suggest to run a profiler such as NVidia NSight to see what is going on for learning purposes.
You can download the demo below:
As you seen in the video above the tiled deferred rendering implementation allows my engine to render an insane amount of lights while maintaining 60 FPS. In the video I cap out at 10,0000 point lights at 60 FPS. We reduce texture fetches in the tiled method by switching from sampling per light for every pixel in a normal deferred renderer to sampling once per pixel and then iterating over all lights within a specific tile to compute the final color. All though rendering shadows now become a little more complicated due to the fact that we cant reuse shadow maps. This can be fixed by creating a big resolution shadow map texture and then proceed to give small sections of that texture to a light casting shadow. Note that when rendering an insane amount of lights you can not do it all in one pass. Compute shaders have a limited amount of thread group shared memory. Once this gets to big you will see performance dip. So we have to break down the lighting pass into multiple passes. For example, when rendering 10,000 lights, we can break it down such that 10,000 / 1024 = 9.78 = 10. This means that to render that high amount of lights we require 10 passes through the tiled lighting. This is very important and 1024 is just an example value. You could go higher but all depends on what works best and this you have to play with.
Implementing this into my pipeline was really fun and rewarding. In the near future I will be putting a tiled forward implementation to get alpha support. Tiled forward and deferred can easily be used together. Hope you enjoy.
I would highly suggest to run a profiler such as NVidia NSight to see what is going on for learning purposes.
You can download the demo below: