Only do this if not writing velocity from base pass/EmitGBuffer.
That would be needed if we want velocity early in the frame (eg for dbuffer last frame normal reprojection).
Added permutations to control whether velocity is written to all the flavors of EmitDepth shader.
#rb graham.wihlidal
[CL 16703403 by Jeremy Moore in ue5-main branch]
The previous method has been replaced with a tiled work queue system.
At the high-level, Lumen cards are dispatched against a batch group of N lights (default=16).
Cards are chopped into 8x8 tiles of work, corresponding to the minimum Lumen card size, and subject to temporal and light culling.
Tiles which pass the culling stages are submitted to the raygen shader, where visibility is determined per light and stored in a 32-bit shadow mask.
Virtual shadow mask lookup was added as a potential late-time culling criteria in the ray-gen shader, but did not provide any noticeable traversal speedup. It is currently permuted out.
The shadow mask is applied as the visibility score to the direct lighting stage and used for off-screen shadowing.
r.LumenScene.DirectLighting.HardwareRayTracing (default=1)
Timing results for a single frame in Sun Temple with r.LumenScene.Lighting.ForceLightingUpdate=1 & r.LumenScene.DirectLighting.ForceOffscreenShadowing=1
Software Ray Tracing: 9.20ms
Hardware Ray Tracing: 8.16ms
Under normall circumstances, r.LumenScene.DirectLighting.ForceOffscreenShadowing=0 and provides a significant speedup for software tracing:
Software Ray Tracing: 4.83ms
Hardware Ray Tracing: 8.16ms
We expect to reclaim some speedup for hardware ray tracing by reordering the pipeline such that virtual shadow mapping can pre-populate the shadow mask and act as a more performant culling criteria.
#rb krzysztof.narkowicz
#ROBOMERGE-SOURCE: CL 16618392
#ROBOMERGE-BOT: (v828-16531559)
[CL 16618400 by patrick kelly in ue5-main branch]
- Enables overlapping batched and non-batched instance culling (needed for batching work).
- Removes some explicit transitions & minor cleanup.
- Added tracking the required number of instances (fixes non-nanite VSM for large ISMs)
#rb graham.wihlidal,jian.ru,yujiang.wang,zach.bethel
#preflight 60b73f38107dc600017d931b
[CL 16544217 by Ola Olsson in ue5-main branch]
Clean up atmospheric fog and have it instaciate a sky atmosphere by default instead
AtmosphericFog now inherits from SkyAtmosphere and looks vaguely similar. Serialisation is handled with a serialisation enum + ue5 version.
"ClassRedirects" could not be used because parameters are not compatible and also due to different serialisation on both component.
So instead Skyamtosphere now has a bool bIsAtmosphericFog (false by default).
AtmosphericFog component now inheriting from Skyatmosphere is setting that to true so that serialisation can be properly handled for both cases : pure Skyatmosphere or SkyAtmosphere replacing a AtmosphericFog with loading/saving. This also supports StaticLightingGUID once converted, see USkyAtmosphereComponent::Serialize.
SkyAtmosphere aerial perspective is now properly gated behind the base pass vertex shader designed for that using BASEPASS_SKYATMOSPHERE_AERIALPERSPECTIVE.
Removed all AtmosphericFog related render code.
Renamed a bunch of shader permutation.
UActorFactoryAtmosphericFog is removed so that the actor is no longer visible and instanciable from menu (existing actors in levels are still created correctly)
UAtmosphericFogComponent is made notplaceable.
ShooterGame compiled and ran succesfuly.
Colton Daniels (QA) will upate reference screneshot in a later CL.
#rb Charles.derousiers, Marc.Audy, Kevin.Ortegren
[CL 16455741 by Sebastien Hillaire in ue5-main branch]
- New Drain() method on FRDGBuilder; will flush all pending work.
- Drained passes are not culled; resource lifetimes are extended; async compute fences are optimized as best as possible but fence joining may occur after the drain.
- Batch up and pre-build all resource transitions. This is a prerequisite for parallel command lists.
- Removed ServiceLocalQueue passes with built-in RDG AddDispatchHint().
#jira UE-114622
[CL 16393495 by zach bethel in ue5-main branch]
The SSS profile texture should be set in the View before we try to setup ray tracing light data.
#rb trivial
#preflight 60a2f498292e3200012c655e
[CL 16362174 by chris kulla in ue5-main branch]
- Was previously disabled only on selected platforms (UE-62964)
#jira UE-115098
#fyi Ben.Woodhouse, Zach.Bethel
#rb none
[CL 16250988 by Luke Thatcher in ue5-main branch]
This is another small step towards enabling path tracing specific shader permutations.
This requires re-caching the raytracing mesh commands when we flip to and from path traced rendering.
Cleanup some flag handling by removing the redundant ERayTracingRenderMode enum since it is already capture by show flags.
Avoid checking the path tracing flag per view since it is always common to all views
Re-introduce the deduplication over views for the non-path tracing case since ray tracing effects can be enabled in a view dependent fashion.
Rename CanOverlayRayTracingOutput to HasRayTracedOverlay which I think is a bit clearer. Note that the meaning has flipped - it now returns true when path tracing or ray tracing debug modes are enabled.
Remove leftovers of GAveragePathTracedMRays (which wasn't hooked up to anything anymore)
Refactor static variables used to store path tracing state into a pimpl object off of the ViewState
#rb Patrick.Kelly, Yuriy.ODonnell, Juan.Canada
[CL 16249998 by chris kulla in ue5-main branch]
Add option to r.CustomDepth.Order to select before or after base pass based on DBuffer project setting.
Made this new option the default.
Means that custom stencil "just works" with DBuffer decals.
#rb none
#preflight 6096d93d6aff750001100a96
[CL 16243435 by Jeremy Moore in ue5-main branch]