GPU Lightmass saw a performance regression after using more of the material model for translucent shadow support. Reclaim some performance by special casing more of the material logic for the subset that GPULM needs.
#rb Yujiang.Wang
#preflight 609ad275ab726700013a472c
[CL 16278525 by chris kulla in ue5-main branch]
First version, will be improved.
DMFP input is used to control the back face lighting transmittance using MFP representation.
It is not possible to combine the Thin lighting and SSS mode so SSS post process is forced disabled when Thin lighting model is encoutered
#rb charles.derousiers
[CL 16125446 by Sebastien Hillaire in ue5-main branch]
Add PPV flag to enable path traced emissive materials (on by default). These paths are not always needed if there are lots of tiny emitters, or if the scene was modelled with both emissive geometry and lights.
Change Skip* variables to Enable* to be more intuitive
Turn the sampler options into a proper enum since they were intended to be mutually exclusive
Tweak MaxPathIntensity logic to match Lumen and avoid color shifts
#rb Juan.Canada
#preflight 6079ba3dd400b70001571289
[CL 16036532 by chris kulla in ue5-main branch]
Split the light list info finite (point, spot, rect) and infinite (skydome, directional) sets. Build a 2d grid of which finite lights overlap particular regions. The grid is aligned to the bounding box of all lights and collapsed along the shortext axis so that memory usage scales quadratically with resolution instead of cubically. The light list per cell is currently pre-allocated up to a maximum count per cell (overflow is simply cut and lights are dropped as they were prior to this change). In most scenes I have tried so far this maximum is never reached with the current defaults of 256^2 resolution and 128 max lights per cluster.
#rb Patrick.Kelly
#preflight 60785d289e2d7a00016e3032
[CL 16022731 by chris kulla in ue5-main branch]
When enabled, shuffle pixel coordinate and share random number streams to improve the coherence of execution. This can provide large speedups (2x or more) on some scenes, and even modest speedups on complex scenes (30% or so). However it comes at the price of somewhat distracting artifacts at low sample counts that may be objectionable.
Leaving this disabled by default for now to gather feedback.
#rb Juan.Canada
[CL 15825443 by chris kulla in ue5-main branch]
This patch just adds the basic support for evaluating the texture, it is not taken into account in the importance sampling. Also, currently limited to 8 slots like the RT path until we get proper bindless support.
#rb Patrick.Kelly
[CL 15751254 by chris kulla in ue5-main branch]
- added a simple and fast clear path of the material buffer
- light and env light passes now reads AO and isStrataMaterial from the StrataHeader. No longer reads the classification or gbuffer data.
- Handle the max BSDF count case from the compiler.
Clear est 0.1ms at 1080p
SkyEnv pass cost 0.7->0.6ms et occupancy 60->70%
#rb Charles.deRousiers
[CL 15364191 by Sebastien Hillaire in ue5-main branch]
No functionality change in this review, just getting the code ready for implementing these features
#rb Patrick.Kelly
#rb Juan.Canada
[CL 15339212 by chris kulla in ue5-main branch]
Default-no-strata => Strata before => Strata after simple tiled memory
Base pass: 1.2 => 2.4 => 1.4 ms
Light pass: 0.7 => 1.6 => 0.6 ms
SkyEnv: 1.0 => 2.0 => 0.7 ms
Classification xx => 2ms => 0.15 ms
#rb Charles.deRousiers
[CL 15336377 by Sebastien Hillaire in ue5-main branch]
Instead of re-using the indirect ray for shadow calculations with BxDF sampling, trace these rays with a dedicated loop so that shadow casting options can be hanlded consistently. This runs slowers but allows us to correctly handles options like non-shadow casting objects and materials.
Added support for non-shadow casting lights
Fixed an RDG validation error from the render target action
#rb Patrick.Kelly
[CL 15071687 by chris kulla in ue5-main branch]
There will be naming update after (not done here to not bloat the review) and update for the metal/volume representation after.
#rb charles.derousiers
[CL 15065874 by Sebastien Hillaire in ue5-main branch]
This was recommended by Nvidia in the RT path and also makes the code a bit cleaner. It also reduces the number of places that impose an upper limit on light count.
#rb Patrick.Kelly, Yujiang.Wang
[CL 14993128 by chris kulla in ue5-main branch]
These controls are non-physical but still heavily used, so will help with comparing between the path tracer and lit modes
Also fixed Lightmass2 plugin from recently added IES support (although this path does not support IES just yet)
Merged the mobiility and type fields into flags to reduce memory usage a bit and moved the definitions that need to be shared between c++ and HLSL to a shared header file
#rb Patrick.Kelly
[CL 14922499 by chris kulla in ue5-main branch]