Expand description
Physically based rendering (PBR) integration for WaterDropEngine.
This crate wires the PBR rendering stack into the engine and exposes the core building blocks to configure deferred PBR rendering.
The PBR rendering stack is built on top of the deferred rendering pipeline, and consists of the following passes:
- [
RenderPassEnvironment] (featureatmosphere): Bakes the ambient lighting of theEnvironmentDatafrom the sky when the sun moves: spherical harmonics for the diffuse light, and a prefiltered cube map for the reflections. RenderPassDeferredGBuffer: Renders the scene geometry into the G-buffer (only opaque objects). It writes to theDepthTextureand the G-bufferDeferredTextures(depth, albedo, normal, AO, emissive). Nothing is multisampled: averaging G-buffer samples would mix objects with the background at their edges.RenderPassAmbientOcclusion: GTAO at half resolution from the G-buffer depth, then a depth-aware blur, configured by theAmbientOcclusionSettingsresource (disabled by default).RenderPassDeferredLighting: Performs the lighting pass, reading from the G-buffer textures, the ambient occlusion (applied to the ambient light only), the cascaded shadow maps and the environment lighting, and writing to the HDRRenderTexture.RenderPassTransparent: Renders transparent objects, using theDepthTexturefor depth testing, and writing to the sameRenderTextureas the lighting pass.- The
post_processpasses: fog (before the transparent objects), then the temporal anti-aliasing (TAA), the bloom, the composite (color grading, tonemapping, …), and the anti-aliasing (FXAA or SMAA) to the swapchain. They are configured by thePostProcessSettingsresource.
To find out more about the deferred rendering pipeline and how to add custom render subpasses, see the documentation of the deferred module.
Modules§
- deferred
- Deferred PBR module.
- post_
process - Post-processing of the HDR
RenderTexture, configured by thePostProcessSettingsresource.