Storing water in gbuffer and runnign extra lighting pass would be too expenssiv. So instead, when in deferred, single layer water always output the main dir light luminance into a separate 111110 texture.
DF shadow is applied on that texture. DFShadow culling step is cached the first time for a given view in order to be able to reapply DFShadow later with a depth buffer containing water. This save 0.4ms on a base console.
DFShadow is naturaly skipped if the directional light does not have that feature enabled.
When DFShadow is executed, it is basically 0.24ms extra on a base console @ 1080p.
The separated light buffer is an extra 8MB allocated when in deferred.
This only works with deferred for now (forward does not run the reflection/composite pass).
Render target slot assignement is a bit fuzzy but this is a mostly static setup so should be fine. And could change with Strata down the line.
r.Water.SingleLayer.ShaderSupportDistanceFieldShadow is to enabled dfshadow on water for the shaders. Defaults to 1 and will only be enalbed when using deferred and when distance fields are enabled.
r.Water.SingleLayer.DistanceFieldShadow is a runtime toggle of the feature (if enabled the shaders still output to the separate light render target, but that is simply discarded).
Follow up: tile upsample, tile traceshadow, make it work with strata.
Tested shooter and console.
#rb Tiago.Costa, Kevin.Ortegren
#preflight https://horde.devtools.epicgames.com/job/62457ad79f404234145cd424
[CL 19613312 by Sebastien Hillaire in ue5-main branch]
- Check that index values are within the D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC::VertexCount range.
#rb Tiago.Costa
#preflight 62478f89dc6183e3f526a7be
[CL 19607734 by Yuriy ODonnell in ue5-main branch]
215s -> 11s together with previous DDC cache key optimization when cooking an internal project
* Moved to Append methods and changed printf to BytesToHex (added some new core append / BytseToHex methods in 19585530)
* Added local lookup cache around FShaderParametersMetadata::GetStructList()
* Added local lookup cache around Freeze::HashLayout()
* Fixed bug in FUniformBufferNameSortOrder that caused unnecessarily long keys, which means all material keys will change
* Optimized ReferencedUniformBuffers hash map merging
#rb arciel.rekman,ben.ingram,jason.nader,devin.doucette,zousar.shaker
#preflight 6246c18d292f228e0912c54a
[CL 19605396 by Johan Torp in ue5-main branch]
This allows to align view rect onto Strata tile size, which easy multi-view handling with tile rendering.
#rb none
#jira none
#preflight 62498947b6084b98326e36c6
#fyi sebastien.hillaire
[CL 19603857 by Charles deRousiers in ue5-main branch]
This adds r.D3D12.RayTracing.GPUValidation that performs basic ray tracing geometry validation on the GPU.
Currently only the basic inactive triangle rules are checked. Additional checks will be built on this foundation.
#rb aleksander.netzel
#preflight 6244b30cdc6183e3f5f9b06f
[CL 19596627 by Yuriy ODonnell in ue5-main branch]
Add an option to use a thread pool instead of taskgraph for GFX PSO precompile tasks.
Disabled by default. Use r.pso.PrecompileThreadPoolSize=N to enable.
threadpool PSO precompile tasks are not added as dependencies of RHIcmd list and should not block RHIT.
#rb Andriy.Tylychko, Arne.Schober
[FYI] peter.sauerbrei, jack.porter, Arciel.Rekman
#ROBOMERGE-OWNER: allan.bentham
#ROBOMERGE-AUTHOR: allan.bentham
#ROBOMERGE-SOURCE: CL 19571102 via CL 19571115 via CL 19571272 via CL 19571286
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)
[CL 19575811 by allan bentham in ue5-main branch]
- shader got renamed so retarget the associated pre-processor defines to the new shader
- also convert the errors incurred to warnings as they should not be fatal to cooks
#rb Jamie.Hayes
#jira none
#preflight 6245b71c981a2c8eb4808dda
[CL 19573197 by eric mcdaniel in ue5-main branch]
- "Build" command of the PSO commandlet will split the cache, generating separate files for each chunk.
- Criterion is whether any shaders of the PSO can be used by the assets in that chunk (including after deduplication).
- Disabled by default because the runtime part to pick up those files isn't in yet.
#rb Allan.Bentham, Dmytro.Vovk
[REVIEW] [at]Allan.Bentham, [at]Pete.Sauerbrei, [at]Chris.Genova, [at]James.Doverspike, [at]Kenzo.TerElst, [at]Dmytro.Vovk
#preflight 62448dc2e434babd8ae73354
#ROBOMERGE-OWNER: arciel.rekman
#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 19563493 via CL 19563649 via CL 19563674
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)
[CL 19565457 by arciel rekman in ue5-main branch]
Converted a few additional RHICreateTexture2D calls to RHICreateTexture.
Adding a few more FRHITextureCreateDesc::CreateXXX variants to quickly specify extents and formats.
Merging FTextureRWBuffer2D and FTextureRWBuffer3D into a single class FTextureRWBuffer and deprecated the old ones.
#jira none
#rb luke.thatcher
#preflight 62448deb927e60e3415508e5
[CL 19560161 by christopher waters in ue5-main branch]
- Deprecated all the Create functions in FRHITextureDesc
- Added Create functions to FRDGTextureDesc which now derives from FRHITextureDesc instead of just being an alias
- FRHITextureCreateDesc can now be constructed functionally via SetXXX functions that return a reference to the FRHITextureCreateDesc
- Fixed a couple bad uses of FRHITexture*Desc types that should have been using FRDGTextureDesc
#jira none
#rb zach.bethel, luke.thatcher, mihnea.balta
#preflight 623df2e16d39f6b5a057299e
[CL 19516773 by christopher waters in ue5-main branch]
- New RHI command list SetTrackedAccess method for the user to supply a current whole-resource state.
- New RHI command context GetTrackedAccess method for querying the tracked access in RHIBeginTransitions / RHIEndTransitions on the RHI thread.
- Hooked RHICmdList.Transition and FRHICommandListExecutor::Transition to assign tracked state automatically.
- Refactored RDG and resource pools to use new RHI tracking.
- FRDGPooledBuffer / FRDGPooledTexture no longer contain tracked state. RDG temp-allocates state through the graph allocator instead.
- All prologue transitions are 'Unknown', and all epilogue transitions coalesce into a whole resource state.
- Implemented platform support for patching the 'before' state with the tracked state.
- Implemented various RHI validation checks:
- Asserts that the user assigned tracked state matches RHI validation tracked state, for all subresources.
- Asserts that tracked state is not assigned or queried from a parallel translation context.
- Added FRHIViewableResource and FRHIView base classes to RHI. FRHIView contains a pointer to an FRHIViewableResource. This is currently a raw pointer, but should be extended to a full reference in a later CL.
NOTE on RHI thread constraint:
Transition evaluation is now restricted to the RHI thread (i.e. no parallel translation contexts). Transitions aren't performed in parallel translate contexts anyway, so this is not a problem. If, however, we decide to refactor parallel translation to be more general, this implementation could be extended to track the state per context and update from the 'dispatch' thread.
#preflight 6233b4396666d7e753a16aaf
#rb kenzo.terelst
[CL 19513316 by zach bethel in ue5-main branch]