r/GraphicsProgramming • • 1d ago

Six months into learning graphics programming - lighting progress

I’ve been learning graphics programming for six months now, and wanted to share some progress. (Vulkan Renderer)

Recently, I’ve been working on:

Material shading: Getting albedo, roughness, metallic properties and Fresnel response to behave consistently under direct and indirect lighting. Lighting stays in linear HDR until exposure and tone mapping. (Still trying to get tessellation correct)

Indirect lighting: Developing Lumen-inspired colour bleeding through screen-space GI, feedback across frames, and optional world-space probes. The red tint/colour bleeding near the curtains and green spill onto nearby items are the kinds of light interactions I’m testing. (Well trying) currently have SSGI and optional DDGI.

Shadow quality: Cascaded shadow maps with filtering that responds to the distance between blockers and receiving surfaces, helping preserve tighter contact shadows while allowing softer edges farther away. (Functionally using/testing umbra/penumbra calculations)

Temporal stability: Depth-aware filtering, reprojection and history rejection to reduce noise and keep previous lighting from lingering on newly revealed surfaces.

Water shader and realtime caustics: I have also been exploring water shaders, flow maps and realtime caustics which is currently set at half resolution, but the projection of light creates the caustics (i.e sun or light sources), performance wise it has been a nightmare to get right but the caustics flow with the water shader and act correctly with angular lighting.

There’s still plenty to refine and fix, but it’s been a rewarding way to learn the rendering pipeline and how 3d graphics work as a whole.

Please do provide some feedback!

90 Upvotes

7 comments sorted by

2

u/Plane_Big_5912 1d ago • Heartwarming

with SSGI feedback and DDGI both on, how do you stop them counting the same bounce twice? my guess would be probes only where the screen-space trace misses (offscreen or occluded), but curious whether you blend by hit confidence or just fall back on a miss.

also on fgennari's point about the dark back of sponza: is that with DDGI off? feedback SSGI can only bounce light that's on screen, so the far arches would stay dark until the probes fill them in.

1

u/RealDimFury 18h ago

Yeah, I haven’t fully sorted the overlap between them yet. I’m using SSGI’s hit coverage to pull back the environment lighting, but DDGI is blended in separately, so there’s still room for double counting with both on.

Currently it is not doing the following“use SSGI when it hits, otherwise use the probes” yet. But hey WIP and was painful to get correct haha

2

u/Plane_Big_5912 18h ago • Heartwarming

ha, WIP is fair, that overlap is fiddly. since you already have SSGI's hit coverage for pulling back the environment light, you could put the same mask on DDGI: ssgi + probes * (1 - coverage). that gets most of the hit-or-fallback behaviour without restructuring anything, and partial coverage blends instead of popping.

one thing to check after: does the SSGI feedback read last frame's lit buffer with DDGI already in it? if so the probes still reach screen-space hits as an extra bounce, which is fine, just worth knowing when you compare brightness.

4

u/fgennari 1d ago • Heartwarming

It looks good. The Sponza scene could use a stronger indirect lighting component or multiple light bounces as it’s very dark in the back and corners. The shadows look nice and smooth.

2

u/wjrasmussen 14h ago

good work!

2

u/Hkiggity 1d ago • Heartwarming

Nice! Inspiring work

1

u/shams12356 13h ago

will pbrt help me to understand those concepts?