- Setup basic lighting loop (only one directional light) - Fin.
- Implement basic post processing pipeline - Fin.
- Implement basic TAA - Fin.
- Implement basic motion vector pass - Fin.
- Implement more advanced TAA - Fin.
- Implement more advanced materials - Fin.
- Implement precomputed radiance transfer GI with realtime relighting - Fin.
- Offline capture - Fin.
- Runtime radiance update
- Single bounce - Fin.
- Multi bounce - Fin.
- Indirect shadow - Fin.
- Runtime irradiance prefilter - Fin.
- Runtime irradiance sampling - Fin.
- Implement Cascaded Directional Shadow - 50% Fin.
- Cascaded shadowmap render - Fin.
- Cascaded hard shadow sample - Fin.
- Cascaded PCF soft shadow sample - WIP.
- Cascaded PCSS soft shadow sample - WIP.
Dynamic Diffuse GI Test 1
enclosed_room_probe_lit.mp4
Dynamic Diffuse GI Test 2
Sponza_Hallway.mp4
Dynamic Diffuse GI Test 3
Sponza_Timelapse.mp4
Damaged Helmet (glTF 2.0) |
PBR Spheres |
More PBR Materials | More PBR Materials |
Temporal Dithered Parallax Occlusion Mapping - 0 | Temporal Dithered Parallax Occlusion Mapping - 1 |
Clear Coat = 0 (Metallic = 1, Smoothness = .5) | Clear Coat = 1 (Metallic = 1, Smoothness = .5) |
Anisotropy = 0 | Anisotropy = 1 |
Velvet Fabric PBR | Original PBR |
Bit | Usage |
---|---|
0 | Default |
1 | Static objects |
2 | Terrain |
Reserved for TAA
Mask | Usage |
---|---|
00 | Static |
01 | Dynamic |
10 | Alpha |
11 | Custom |
Reserved to exclude pixels from static velocity calculation. Can be used as a custom bit after the velocity passes.
1: Already calculated dynamic velocity
0: Still requires the full screen static velocity pass
Unused
GBuffer | Format | Channel R | Channel G | Channel B | Channel A |
---|---|---|---|---|---|
GBuffer 0 | RGBA16_SFloat | Forward R | Forward G | Forward B | SSS Param / TAA Anti-flicker |
GBuffer 1 | R16G16_UNorm | Normal X | Normal Y | N/A | N/A |
GBuffer 2 | RGBA8_UNorm | Specular R | Specular G | Specular B | Linear Roughness |
GBuffer 3 | R8_UNorm | IBL Occlusion | N/A | N/A | N/A |
Velocity | RG16_SNorm | Velocity X | Velocity Y | N/A | N/A |
Depth | D24S8 | Depth | N/A | N/A | Stencil |
Render the cascaded shadowmap for the main directional light (only support 1 directional light shadow at the moment).
Update the radiance of the diffuse probes.
Prefilter the irradiance of the diffuse probes.
Add the 1-px padding of the irradiance maps for bilinear filtering.
Draw depth and stencil of all occluder objects.
Draw depth and stencil of all the rest objects.
Draw the velocity of the dynamic objects, toggle stencil[2] to 1.
Draw the velocity of the static objects, using stencil[2] to kill dynamic pixels.
Downsample velocity texture to quarter resolution (half width, half height), and each pixel represents the closet velocity of the 2x2 quad.
Draw shadowmap of the main directional light.
Shade forward opaque materials. Output lighting (direct lighting + indirect diffuse + emissive) result and SSS Param to RawColorTex. Output world space normal (Oct Quad Encoded) to GBuffer 1. Output specular color and linear roughness to GBuffer 2. Output IBL occlusion to GBuffer 3.
Evaluate specular IBL.
Compute screen space reflection, output mixing intensity in the alpha channel.
Mix IBL and SSR results together.
Integrate indirect specular result back the lighting buffer, output to ColorTex.
Draw Skybox Pass.
Shade forward transparent materials. Evaluate specular IBL within the forward pass.
Replace NaN, Inf, -Inf with pure black (0, 0, 0, 1).
Resolve taa.
Color grade and tonemap.