Implement tiled dispatch in the path tracer to reduce the likelyhood of GPU timeouts when rendering at high resolution. This also reduces the memory requirements for path state when running with path compaction enabled.
Change from a uint buffer to a structured buffer for storing path states which gives a small speedup.
Add indirect dispatch support to launch less work for compacted bounces (off by default as it does not seem to provide a speedup so far)
#jira TM-6595
#rb Juan.Canada
#preflight 61b27c6a2b48d03df526ce85
#preflight 61b28773ee0de9822e0f02de
#ROBOMERGE-AUTHOR: chris.kulla
#ROBOMERGE-SOURCE: CL 18426885 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v897-18405271)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0
[CL 18426911 by chris kulla in ue5-release-engine-test branch]
Add support for binding a ray tracing material to hair strands so that they can show up in path tracing.
Add hair shading model to path tracer
#rb Charles.deRousiers
#preflight 618e9d3b857f308d859d696a
#ROBOMERGE-AUTHOR: chris.kulla
#ROBOMERGE-SOURCE: CL 18170915 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v894-18169371)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0
[CL 18170941 by chris kulla in ue5-release-engine-test branch]
This implements a ray-traced sampled depth of field which can serve as a ground truth for the post processed depth of field. Users can select between reference quality or post processing with a path tracing specific checkbox in the post process settings.
#rb Guillaume.Abadie,Patric.Kelly,Juan.Canada
#preflight 618bf5abb253729fe2230d0e
#ROBOMERGE-AUTHOR: chris.kulla
#ROBOMERGE-SOURCE: CL 18131692 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0
[CL 18131775 by chris kulla in ue5-release-engine-test branch]
This cvar mainly controls the creation of path tracer specific material permutations. Projects which know they do not want to make use the path tracer should turn this off. Note that the DataDrivenPlatformInfo is also checked to make sure the path tracer is supported on a given platform.
#rb Juan.Canada
#p4v-preflight-copy 18094497
#preflight 6189b0b6c717ba4e92145c31
#ROBOMERGE-AUTHOR: chris.kulla
#ROBOMERGE-SOURCE: CL 18096618 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0
[CL 18096707 by chris kulla in ue5-release-engine-test branch]
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971
[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
The skylight intensity and color is baked as part of the skydome importance tables for the path tracer, RT skylight and RT reflections. If this change is done without creating a new skylight proxy (for example when keyframed via the sequencer) it is possible the change to go un-noticed. For a similar reason, the path tracer would not restart sample accumulation in this case.
The fix is to just store the color used the last time the importance tables were baked and detect when this has changed. An alternative fix would be to leave the multiplication by the skylight color outside of the importance tables, but it seems better to fold this in as skylight intensity changes are probably rare.
#jira UE-133028
#rb Juan.Canada
#preflight 618326af92492200018b5559
#ROBOMERGE-AUTHOR: chris.kulla
#ROBOMERGE-SOURCE: CL 18044643 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0
[CL 18044735 by chris kulla in ue5-release-engine-test branch]
Originally done by Chris for path tracing, ported for raytracing
#rb chris.kulla, yuriy.odonnell, juan.canada
#jira none
#preflight 617c67b5ec42930001bd07d9
#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 17992421 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)
[CL 17992424 by charles derousiers in ue5-release-engine-test branch]
The absorption coefficient is derived from the BaseColor of the material and a global scale factor that gives the inverse distance at which the target BaseColor is achieved. Setting this cvar to 0 disables the effect. The default value of 0.01 corresponds to specifing the target color after travelling through 1 meter of surface. This scale factor will not be needed in future material models that provide more direct control over the absorption color.
The implementation remembers the current absorption value as part of the PathState. For shadow rays, when approximate caustics are being used, the contribution is tracked by simply counting up/down at each interface. An offset is used to account for the possibility of light starting inside an object for finite light sources.
Refactored TraceTransparentRay to directly use the PathState struct since it was accessing most of its fields anyway and the function signature was getting too long
#rb Patrick.Kelly
#preflight 61422aac3c7c67000197ca0b
#ROBOMERGE-AUTHOR: chris.kulla
#ROBOMERGE-SOURCE: CL 17524226 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
[CL 17524248 by chris kulla in ue5-release-engine-test branch]
Implement basic energy conservation using albedo tables of the GGX and cloth lobes. Reflection and refraction are tabulated independently.
Also provide analytic approximations for the reflection case if a tabulation is not convenient. If a good analytic approximation for the glass case can be found (requires a 3D fit), we should remove the tabulated implementation which was done mainly to provide a baseline.
The albedo table is also used to improve lobe selection probabilities, which improves sampling of the clearcoat case in particular.
Refactored how the path tracer's internal view state data is stored to keep the structure details fully hidden inside PathTracing.cpp
#rb Patrick.Kelly
#preflight 613814072d09b900014699c9
#ROBOMERGE-AUTHOR: chris.kulla
#ROBOMERGE-SOURCE: CL 17452976 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
[CL 17452996 by chris kulla in ue5-release-engine-test branch]
Should use the provided shader platform when deciding which permutation to compile instead of relying on the global GRHISupportsWaveOperations
Enable wave operations for PCD3D_SM6 (part of ShaderModel 6.0)
#jira UE-122170
#rb Christopher.Waters
#preflight 6125b1f945848f00013089d9
#ROBOMERGE-SOURCE: CL 17298586 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)
[CL 17298597 by chris kulla in ue5-release-engine-test branch]
- Refactored RDG to support free-threaded execution of passes.
- Refactored renderer to use specific RHI command list variants in pass lambda. Immediate command list passes are forced to stay on the render thread, while other variants can be parallelized.
#rb christopher.waters
#ROBOMERGE-SOURCE: CL 16838717 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)
[CL 16838724 by zach bethel in ue5-release-engine-test branch]
Avoid incrementing the path tracer sample and frame index when not accumulating samples
#rb Lucas.Ammann
#preflight 60b9296239e5b70001d02463
[CL 16553724 by chris kulla in ue5-main branch]
Expose a checkbox on PostProcessVolume to control the path tracing denoiser.
Fix the hard clamp on samples/pixel since we don't have any internal limit. A UI clamp is sufficient.
Store the denoiser state in the path tracer config object so it does not get confused per View.
#rb Patrick.Kelly, Juan.Canada
#preflight 60b679deae46a100012ff351
[CL 16520779 by chris kulla in ue5-main branch]
This plugin implements a denoiser for path traced images using the OpenImageDenoise library. The denoiser is enabled by both loading the plugin and setting r.PathTracing.Denoiser=1
Add Albedo/Normal outputs to the path tracer to support the denoiser.
#rb Patrick.Kelly
#jira UE-79847
#robomerge[STARSHIP] -Starship-RES
#ushell-cherrypick of 16455905 by chris.kulla
[CL 16485986 by chris kulla in ue5-main branch]
This permutation will allow the path tracer to evolve independently from other RT passes in the engine. First end-user visible feature is that we disable RayTracingQualitySwitch for this permutation (so that path tracing can see the "full" material quality).
Introduce r.PathTracing cvar to guard the feature so that projects that don't need this functionality don't have to pay for the extra permutation.
Move raytracing clip/ddx/ddy into Common.ush
#jira UE-72537
#rb Patrick.Kelly, Yuriy.ODonnell
#preflight 60a7339365d94d0001bce99d
[CL 16415068 by chris kulla in ue5-main branch]
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]