2019-04-22 18:15:29

Deferred Lighting

Experiencing the visuals in recent games - especially open-world games like GTA V, has inspired me to start work on my rendering framework again, after roughly 4 years of absolutely nothing. This turned out to be quite laborious, as it was originally written on an ATI card with glsl 120 and a lot of extensions. When i fired it up on a newer Nvidia card, nothing worked - in fact it crashed the graphics driver :) here are a few screenshots - the first few are of the broken mess i started with :)

Over the long weekend i've had the chance to get a rough framework in place that allows for an unbounded number of lights (don't worry, i spent some time in the garden as well!). However these lights do not yet cast shadows. I'm struggling to come up with an efficient method for achieving this, though my mind is tending towards relying on very good geometry culling, typically small light volumes and few lights.

Lighting is achieved with multiple passes that are accumulated into a light buffer (shown top right in some screenshots). this is combined with the mssao contribution to provide the shading for the final output.

Here are a few vidoes of the deferred lighting (combined with mssao) so far - these were recorded with OBS Studio (which is awesome) on a Q9550 paired with an Nvidia GTX 260 (yea, old i know). The demo runs at the frame-sync limited speed of 60 fps. In this scene there are 12 lights and the church model material has a brown diffuse colour and has no texturing.

2019-04-21 22-38-32-1.mp4

Size: 37.65 MB, Date: 2019-04-21 22:50, MD5: 724e536680da816b9dc17c830b5c1a6f

2019-04-22 02-30-06-1.m4v

Size: 18.81 MB, Date: 2019-04-22 02:41, MD5: 3d10915b89fe8598640d637d3fc00498

These vidoes were encoded in a 'web-optimised' fashion, so they should hopefully start playing immediately, but the upload rate of my server is not the fastest :)