- Data Structure and Relationships on the CPU Side
- Process of One Pass
- Deferred Renderer
- Base Pass
- Shadow Rendering with Virtual Shadow Map
- Direct Lighting
- Indirect Lighting with Lumen
- Surface Cache: Mesh Cards
- Radiance Cache with Screen & World Probes
- Lumen Reflections
- Compose
- Post Processing
Data Structure and Relationships on the CPU Side
Let's first focus on the important data structures related to rendering.
In this section, I will briefly introduce the transformation process between them and how they are ultimately converted into data for rendering.
Asset and Game WorldRender DataRender ProxyMesh BatchesMesh Draw CommandsRHI Command ListGPU RenderingFrom Material to ShadersFrom Render Data to Shader InputsA Short SummaryProcess of One Pass
In the previous section, you have already learned about important data structures. Therefore, in this section, we will delve into how data is transformed in a Pass.
In this section, we will cover more details, including how rendering instructions are cached and how objects are culled.
Load Static Mesh DataFrom Render Proxy to Mesh BatchesFrom Mesh Batch to Mesh Draw CommandsFrom Mesh Draw Commands to RHI CommandsCacheCullingSetup Mesh PassExam : Try to draw a cube by yourselfDispatch Draw CommandsVertex Shader of Depth PrepassData Structure on GPUDeferred Renderer
In the previous section, we delved into the workings of a Pass. Building upon that, we will now further discuss the deferred renderer of the Unreal Engine, which is composed of multiple Passes.
In this section, we will focus more on the GPU aspect and discuss how different Passes are rendered and how their data is exchanged. This will answer the question of how the color of a pixel on the screen is determined.
The global map of the renderingBase Pass
Base PassShadow Rendering with Virtual Shadow Map
Introduction to Virtual Shadow MappingPage Allocation, Culling and RasterizerPage Allocation DetailsShadow Mask Buffer RenderingDirect Lighting
The Theory of LightingPoint Light RenderingIndirect Lighting with Lumen
Lumen OverviewParallel with GPUSurface Cache: Mesh Cards
Cards in the LumenLumen Scene UpdateDirect Lighting InjectionIndirect lighting with RadiosityRadiance Cache with Screen & World Probes
Screen Probe Placement and Importance SamplingScreen, Mesh, Voxel TraceFilter Radiance of Screen ProbesConvert to IrradianceShort Range AO with Bent NormalIntegrateUpdate Radiance CacheLumen Reflections
Lumen ReflectionsCompose
CompositePost Processing
Temporal Super ResolutionMotion BlurBloomTone MappingEndingReferencesSpecial ThanksPiece of content was written with ChatGPT and Notion AI.
- ChatGPT is mainly used for analyzing and organizing a portion of the shader code to reduce the complexity of manually analyzing huge shader code files.
- This includes generating Python code for HLSL code in order to simulate intermediate results on the CPU.
- The outputs from ChatGPT are reviewed and verified by the author.
- Notion AI is used to polish the author's English writing to overcome the author's non-native English speaker limitations.