Home

Awesome

UltimateTAA

Roadmap

  1. Setup basic lighting loop (only one directional light) - Fin.
  2. Implement basic post processing pipeline - Fin.
  3. Implement basic TAA - Fin.
  4. Implement basic motion vector pass - Fin.
  5. Implement more advanced TAA - Fin.
  6. Implement more advanced materials - Fin.
  7. Implement precomputed radiance transfer GI with realtime relighting - Fin.
    1. Offline capture - Fin.
    2. Runtime radiance update
      1. Single bounce - Fin.
      2. Multi bounce - Fin.
      3. Indirect shadow - Fin.
    3. Runtime irradiance prefilter - Fin.
    4. Runtime irradiance sampling - Fin.
  8. Implement Cascaded Directional Shadow - 50% Fin.
    1. Cascaded shadowmap render - Fin.
    2. Cascaded hard shadow sample - Fin.
    3. Cascaded PCF soft shadow sample - WIP.
    4. 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
Damaged Helmet (glTF 2.0)
PBR Spheres
PBR Spheres
More PBR Materials - 1More PBR Materials - 0
More PBR MaterialsMore PBR Materials
Temporal Dithered Parallax Occlusion Mapping - 0Temporal Dithered Parallax Occlusion Mapping - 1
Temporal Dithered Parallax Occlusion Mapping - 0Temporal Dithered Parallax Occlusion Mapping - 1
Without Clear CoatWith Clear Coat
Clear Coat = 0 (Metallic = 1, Smoothness = .5)Clear Coat = 1 (Metallic = 1, Smoothness = .5)
Without AnisotropyWith Anisotropy
Anisotropy = 0Anisotropy = 1
fabric_material.pngnon_fabric_material.png
Velvet Fabric PBROriginal PBR

Advanced Render Pipeline

Rendering Layers

BitUsage
0Default
1Static objects
2Terrain

Stencil Bits

Bits 0 (LSB) - 1

Reserved for TAA

MaskUsage
00Static
01Dynamic
10Alpha
11Custom

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

GBufferFormatChannel RChannel GChannel BChannel A
GBuffer 0RGBA16_SFloatForward RForward GForward BSSS Param / TAA Anti-flicker
GBuffer 1R16G16_UNormNormal XNormal YN/AN/A
GBuffer 2RGBA8_UNormSpecular RSpecular GSpecular BLinear Roughness
GBuffer 3R8_UNormIBL OcclusionN/AN/AN/A
VelocityRG16_SNormVelocity XVelocity YN/AN/A
DepthD24S8DepthN/AN/AStencil

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.