Add a world dither. Not necessarily useful but can be somewhat analygous to PCF radius.
Add permutation to SMRT samples = 0 (and possibly more in the future).
#preflight 628eab6fc826bd5a7f1135ec
#rb ola.olsson
#ROBOMERGE-AUTHOR: andrew.lauritzen
#ROBOMERGE-SOURCE: CL 20372897 via CL 20372913 via CL 20372922
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)
[CL 20373677 by andrew lauritzen in ue5-main branch]
- Add slope-based depth extrapolation which improves the quality of penumbras on angled receivers. Costs ~10% performance in some cases so maintaining a permutation/cvar (default on) for scalability.
- Change screen ray trace to be a simple "space skipping" ray that terminates as soon as it goes behind geometry and continue VSM trace from that distance. This avoids various contact-shadow-like artifacts and undesirable/inconsistent contact shadows from things that aren't in the VSM. In certain cases if regular contact shadows are desired on top of VSM the engine contact shadows can be enabled, as it is with CSMs.
- Remove a bunch of use of "halfs" in the shaders as they cause some extra ALU on some platforms and don't appear to really be helping with occupancy anymore
- Small bump to minimum normal bias clamp (only affects things very close to the camera)
#rb brian.karis
[FYI] ola.olsson
#ROBOMERGE-AUTHOR: andrew.lauritzen
#ROBOMERGE-SOURCE: CL 19411300 via CL 19411627
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v928-19376421)
[CL 19413239 by andrew lauritzen in ue5-main branch]
This avoids to define STRATA_ENABLED as 'env. define' for all global shaders needing a Strata specific path.
#rb none
#jira none
#fyi sebastien.hillaire
#preflight 62151b25797dbbeb472ae2eb
[CL 19074999 by Charles deRousiers in ue5-main branch]
Move visualize enum/defines to shared header file.
Rename a few cvars for consistency.
#rb graham.wihlidal
[FYI] ola.olsson
#preflight 61f9d8921d7ca8ed2d628ccd
#ROBOMERGE-AUTHOR: andrew.lauritzen
#ROBOMERGE-SOURCE: CL 18819821 in //UE5/Release-5.0/... via CL 18819825 via CL 18822904
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18825054 by andrew lauritzen in ue5-main branch]
Expand Z range of clipmap levels to fix some rare artifacts related to SMRT walking off the Z range with certain settings.
#rb ola.olsson
#preflight 61aea891fc6bcc8e1975cdff
#ROBOMERGE-AUTHOR: andrew.lauritzen
#ROBOMERGE-SOURCE: CL 18400198 in //UE5/Release-5.0/... via CL 18400211
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)
[CL 18400217 by andrew lauritzen in ue5-release-engine-test branch]
- Add some dither noise to both the SMRT result and the shadow mask lookup to minimize banding
- Fall back to a single sample VSM lookup (with a generous static bias) when overflowing the number of lights in one pass projection path
- Fix clamping issue with page dilation that was setting extraneous pages with point lights
- Fix SMRT issue with local lights jammed right next to geometry viewed at a distance
- Separate settings for page dilation for local and directional lights
- Add simple debug output for # lights in one pass projection
- Remove some dead code/parameters
#ROBOMERGE-AUTHOR: andrew.lauritzen
#ROBOMERGE-SOURCE: CL 18279117 via CL 18373418 via CL 18373449
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18373485 by andrew lauritzen in ue5-release-engine-test branch]
Helps to hide aliasing due to insufficient shadow resolution, albeit at the cost of requiring an optimal bias (which can occasionally increase peter-panning).
Default on as it is generally a net quality improvement in most case, but can be disabled via cvar.
#preflight 6137f26525e54000014fa848
#rb brian.karis
#ROBOMERGE-AUTHOR: andrew.lauritzen
#ROBOMERGE-SOURCE: CL 17452212 via CL 17910699 via CL 18360668 via CL 18360819
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18360872 by andrew lauritzen in ue5-release-engine-test branch]
Page allocation part is a fairly minor benefit in most scenes but can occasionally make a big difference.
Projection early-out is a pretty uniform benefit all the time, especially with SMRT.
#preflight 612d1b836a14cc000118f03a
#rb ola.olsson
#ROBOMERGE-SOURCE: CL 17388425 via CL 17389280
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)
[CL 17389330 by andrew lauritzen in ue5-release-engine-test branch]
#ROBOMERGE-SOURCE: CL 16917622 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)
[CL 16917631 by andrew lauritzen in ue5-release-engine-test branch]
- Add VirtualShadowMapId to forward light data, removing the per-view remapping table. Should fixe a few multi-view/split-screen bugs.
- Minor cleanup of PCF subsurface path; remove dead/broken code.
- Fix up blending of light attenuation into screen shadow mask; disable CSM fading when VSMs are enabled.
- Fix OnePassProjection flag when VSMs are disabled
#rb none
[FYI] ola.olsson, brian.karis
#ROBOMERGE-SOURCE: CL 16852407 via CL 16852415
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)
[CL 16852422 by andrew lauritzen in ue5-release-engine-test branch]
Use actor label for light identification/selection in editor; fall back on component name (UUID) temporarily until this data is made available outside the editor as well
Collect debug data in RayState for SMRT and return the last valid sample data
- Alternative is to always generate debug data based on just a single VSM sample even when SMRT is enabled, but it's useful to have a debug output path for the true SMRT data, even if a bit more complex
Move some common visualization utilities to /Visualization.ush
Implement but disable backface culling for shadow evaluation pending change that handles various SHADINGMODEL's properly
#rb graham.wihlidal, ola.olsson
#ROBOMERGE-SOURCE: CL 16407102 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v804-16311228)
[CL 16412421 by andrew lauritzen in ue5-main branch]
No more need for writing out the "signal" texture info, so reduce that to single F32 for shadow factor
No need to return HitDistance as far up the stack in the shaders
Remove VSM defines and permutations from screen space denoiser
#rb guillaume.abadie
#lock nick.whiting
#ROBOMERGE-OWNER: andrew.lauritzen
#ROBOMERGE-AUTHOR: andrew.lauritzen
#ROBOMERGE-SOURCE: CL 16117127 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)
#ROBOMERGE-CONFLICT from-shelf
[CL 16117874 by andrew lauritzen in ue5-main branch]
Rename parameter to "r.Shadow.Virtual.NormalBias" to better represent its unit-less value and give a reasonable default value.
#lockdown nick.whiting
#rb brian.karis, graham.wihlidal
#ROBOMERGE-SOURCE: CL 16097675 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)
[CL 16097704 by andrew lauritzen in ue5-main branch]