You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
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]