This is a very simple/early version of my deferred renderer written from scratch in OpenGL (it does not use any external libraries). This demo runs on Linux only at the moment. The depth/colour/normal/material data for each pixel is stored in a G-Buffer during the first pass. In the second pass the cubes are lighted using the information from the G-Buffer, currently using only a single light. Multi-sampling is performed by using textures which contain multiple samples per pixel for the G-Buffer. In the lighting pass each sample is used to perform anti-aliasing. The depth buffer is used to obtain the 3D position of each pixel during the lighting pass.
Setup of the G-Buffer (all textures are multisampled textures with 2, 4 or 8 samples per pixel, in this video 4 samples per pixel are used):
depth: GL_DEPTH_COMPONENT32F
normals: GL_RGB16F
colours: GL_RGBA16F
material id: GL_RGB16UI (unfortunately the driver of my graphics card did not allow creating a GL_R32UI multisampled texture at that time).
Very nice! Would you be willingly to share the sourcecode?
Tommie0607 4 months ago