Deferred Renderer

preview_player
Показать описание
This is a deferred renderer that uses a standard geometry pass, into a stencil and light pass. The lighting in use at the moment is basic phong shading, without attenuation being applied. It can support up to 66 lights at 30 fps at the moment on at least the hardware setup i'm running (AMD Radeon HD 7970M). The cout timers that show up part way through the video are slightly off screen (sorry!), the consistently 2nd highest is the render time, lowest is update time and highest is both of them together.

The stencil pass is a little overkill for the current usage and is eating up the majority of the frame time, as it has to constantly state change and buffer clear for every light in the scene. i.e. for all lights: stencil pass, then light pass. So getting rid of that or making the stencil pass optional would be the next step.

It's written in C++ and uses OpenGL as the rendering API. It uses a couple of libraries like glew, glm, SDL etc. for window support, linear algebra and GL extension wrangling.
Рекомендации по теме