Awesome
UltimateTAA
Roadmap
- 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.
Preview
Dynamic Diffuse GI Test 1
https://user-images.githubusercontent.com/30316509/167318723-7e36ca47-cabe-4092-8db7-6bae51ac07b5.mp4
Dynamic Diffuse GI Test 2
https://user-images.githubusercontent.com/30316509/167318672-e426d779-b720-4a7e-9e76-68659d5fe0f7.mp4
Dynamic Diffuse GI Test 3
https://user-images.githubusercontent.com/30316509/167318664-84ab9bf6-e36a-44aa-a0f9-d17580d8d2cb.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 |
Advanced Render Pipeline
Rendering Layers
Bit | Usage |
---|
0 | Default |
1 | Static objects |
2 | Terrain |
Stencil Bits
Bits 0 (LSB) - 1
Reserved for TAA
Mask | Usage |
---|
00 | Static |
01 | Dynamic |
10 | Alpha |
11 | Custom |
Bit 2
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
Bits 3 - 7
Unused
Thin - GBuffer
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 Pass Overview
Cascaded Shadowmap Pass
Render the cascaded shadowmap for the main directional light (only support 1 directional light shadow at the moment).
Diffuse Probe Radiance Update Pass
Update the radiance of the diffuse probes.
Diffuse Probe Irradiance Update Pass
Prefilter the irradiance of the diffuse probes.
Diffuse Probe Irradiance Padding Pass
Add the 1-px padding of the irradiance maps for bilinear filtering.
Occluder Depth Stencil Prepass
Draw depth and stencil of all occluder objects.
Depth Stencil Prepass
Draw depth and stencil of all the rest objects.
Dynamic Velocity Pass
Draw the velocity of the dynamic objects, toggle stencil[2] to 1.
Static Velocity Pass
Draw the velocity of the static objects, using stencil[2] to kill dynamic pixels.
Downsample and Dilate Velocity Pass (Roadmap)
Downsample velocity texture to quarter resolution (half width, half height), and each pixel represents the closet velocity of the 2x2 quad.
Directional Light Shadowmap Pass (Roadmap)
Draw shadowmap of the main directional light.
Forward Opaque Lighting Pass
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.
Specular Image Based Lighting Pass
Evaluate specular IBL.
Screen Space Reflection Pass (WIP)
Compute screen space reflection, output mixing intensity in the alpha channel.
Integrate Indirect Specular Pass
Mix IBL and SSR results together.
Integrate Opaque Lighting Pass
Integrate indirect specular result back the lighting buffer, output to ColorTex.
Skybox Pass
Draw Skybox Pass.
Forward Transparent Lighting Pass (Roadmap)
Shade forward transparent materials. Evaluate specular IBL within the forward pass.
Stop NaN Propagation Pass
Replace NaN, Inf, -Inf with pure black (0, 0, 0, 1).
Resolve Temporal Antialiasing Pass
Resolve taa.
Tonemap Pass
Color grade and tonemap.