Commit Graph

331 Commits

Author SHA1 Message Date
Arciel Rekman
f43f655d5a Fix distance field shadows artifacts in the right eye (UE-150939).
#rb Rob.Srinivasiah
#jira UE-150939
#review @Robert.Srinivasiah
#preflight

[CL 20030333 by Arciel Rekman in ue5-main branch]
2022-05-03 15:14:11 -04:00
jason hoerner
af48ea5a98 UE5_MAIN: Multi-view-family scene renderer refactor, part 2. Move FSceneTextures singleton out of RDG blackboard and FSceneTexturesConfig global variable singleton, into FViewFamilyInfo. This is necessary to allow multiple view families to render in a single render graph and a single scene renderer call.
* Existing calls to CreateSceneTextureShaderParameters and similar functions use "GetSceneTexturesChecked", which allows for the possibility that they are reached in a code path where scene textures haven't been initialized, and nullptr is returned instead of asserting.  The shader parameter setup functions then fill in dummy defaults for that case.  The goal was to precisely match the original behavior, which queried the RDG blackboard, and gracefully handled null if scene textures weren't there.  This definitely appears to occur in FNiagaraGpuComputeDispatch::ProcessPendingTicksFlush, which can be called with a dummy scene with no scene textures.  In the future, I may change this so dummy defaults are filled in for FSceneTextures at construction time, so the structure is never in an uninitialized state, but I would like to set up a test case for the Niagara code path before doing that, and the checks aren't harmful in the meantime.
* I marked as deprecated global functions which query values from FSceneTexturesConfig, but they'll still work with the caveat that if you use multi-view-family rendering, the results will be indeterminate (whatever view family rendered last).  There was only one case outside the scene renderer that accessed the globals (depth clear value), which I removed, noting that there is nowhere in the code where we modify the depth clear value from its global default.  I would like to permanently deprecate or remove these at some point.  Display Cluster is the only code that's currently using the multi-view-family code path, and as a new (still incomplete) feature, third party code can't be using it, and won't be affected.

#jira NONE
#rb chris.kulla zach.bethel mihnea.balta
#preflight 6261aca76119a1a496bd2644

[CL 19873983 by jason hoerner in ue5-main branch]
2022-04-22 17:33:02 -04:00
Wei Liu
2be82d909c Fix a bug of depthAux corruption on mobile opengl.
#jira UE-145101

#rb Dmitriy.Dyomin
#preflight 62629916d929bc34a3269fb2

[CL 19863137 by Wei Liu in ue5-main branch]
2022-04-22 08:07:57 -04:00
jason hoerner
b19bb6be2f UE5_MAIN: Multi-view-family scene renderer refactor, part 1. Major structural change to allow scene renderer to accept multiple view families, with otherwise negligible changes in internal behavior.
* Added "BeginRenderingViewFamilies" render interface call that accepts multiple view families.  Original "BeginRenderingViewFamily" falls through to this.
* FSceneRenderer modified to include an array of view families, plus an active view family and the Views for that family.
* Swap ViewFamily to ActiveViewFamily.
* Swap Views array from TArray<FViewInfo> to TArrayView<FViewInfo>, including where the Views array is passed to functions.
* FSceneRenderer iterates over the view families, rendering each one at a time, as separate render graph executions.
* Some frame setup and cleanup logic outside the render graph runs once.
* Moved stateful FSceneRenderer members to FViewFamilyInfo, to preserve existing one-at-a-time view family rendering behavior.
* Display Cluster (Virtual Production) uses new API.

Next step will push everything into one render graph, which requires handling per-family external resources and cleaning up singletons (like FSceneTextures and FSceneTexturesConfig).  Once that's done, we'll be in a position to further interleave rendering, properly handle once per frame work, and solve artifacts in various systems.

#jira none
#rnx
#rb zach.bethel
#preflight 625df821b21bb49791d377c9

[CL 19813996 by jason hoerner in ue5-main branch]
2022-04-19 14:45:26 -04:00
Wei Liu
04d7580d62 Clustered local lights and reflections are supported on mobile forward and deferred.
Local light shadows are supported on mobile forward and deferred, need to enable full depth prepass to generate the ShadowMaskTexture.

Remove the 4 maximum local lights limitation on mobile forward.

Remove the "High Quality Reflection" on mobile forward.

Disable simple lights on mobile forward.

#jira UE-149064

#rb Dmitriy.Dyomin

#preflight 625d17da772cf82d3a6059a6

[CL 19784597 by Wei Liu in ue5-main branch]
2022-04-18 09:09:40 -04:00
Arciel Rekman
700c39e0e7 Fix VSM debug view being the same for the right eye.
#rb Andrew.Lauritzen
#review @Andrew.Lauritzen, @Robert.Srinivasiah, @Jules.Blok
#jira none
#preflight 625642c45f20a0a34d8fbaf7

[CL 19734289 by Arciel Rekman in ue5-main branch]
2022-04-12 23:44:41 -04:00
tiago costa
e90e058b9f Fix DF Shadows when using split screen.
- Point/Spot lights use the same FProjectedShadowInfo for all views. RayTracedShadowsTexture was only generated for the first view. Other views also sampled first view data.
- Store RayTracedShadowsTexture per view in DistanceFieldShadowViewGPUData to avoid using the cached result of a different view.

#rb Sebastien.Hillaire, Jian.Ru
#preflight 624ef87e3603402d600744e1

[CL 19669626 by tiago costa in ue5-main branch]
2022-04-07 11:06:06 -04:00
tiago costa
ba8dba2bcd Don't use async compute when calculating DF Shadow for water.
#rb Sebastien.Hillaire
#preflight 624ed3907d2eea4e1804ece4

[CL 19667178 by tiago costa in ue5-main branch]
2022-04-07 08:21:45 -04:00
zach bethel
a00b40ad3b Deprecated GetRenderTargetItem() from IPooledRenderTarget.
#preflight 624ddb30090236773a1a83e0
#rb luke.thatcher

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 19655641 via CL 19655653 via CL 19655661
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19657582 by zach bethel in ue5-main branch]
2022-04-06 18:24:24 -04:00
Charles deRousiers
61cf50b66f Change Strata binding buffer function args to take view instead of the explicit scene data.
#rb none
#jira none
#preflight 6246ee2a292f228e0914eed2
#fyi sebastien.hillaire

[CL 19586823 by Charles deRousiers in ue5-main branch]
2022-04-01 08:35:55 -04:00
Sebastien Hillaire
fe62a6a8c3 Fix for strata crash when disabled.
Backout a file from 19415778.
#rb ola.olsson
#preflight none
#fyi wei.liu

[CL 19418567 by Sebastien Hillaire in ue5-main branch]
2022-03-17 06:17:38 -04:00
Wei Liu
d3e9fe947c Initialize Strata on mobile to fix crashes on mobile.
#jira none

#rb Dmitriy.Dyomin, Sebastien.Hillaire
#preflight 6232808aef5d0f0e8ffcbf37

[CL 19415778 by Wei Liu in ue5-main branch]
2022-03-16 20:43:06 -04:00
arciel rekman
f6ccaa9567 Fix shadow artifacts in the right eye (UE-136749).
#rb Jules Blok, Yuriy O'Donnell
[REVIEW] [at]Jules.Blok, [at]Yuriy.ODonnell
#jira UE-136749
#preflight 62184a6248518fd8cbea663b

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 19142586 in //UE5/Release-5.0/... via CL 19142695
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19156111 by arciel rekman in ue5-main branch]
2022-02-25 16:00:41 -05:00
Charles deRousiers
84c1cb7302 Fix local lighting with strata.
#jira none
#rb none
#fyi sebastien.hillaire
#preflight 62068b6ec663666c89a5cb0f

[CL 18953624 by Charles deRousiers in ue5-main branch]
2022-02-11 11:38:18 -05:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
charles derousiers
e7c3112aab Fix missing hair shadow when camera is within the light volume.
#rb none
#jira none
#preflight 61f2edae7a7f0d39ddb937aa

#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 18758074 in //UE5/Release-5.0/... via CL 18761540 via CL 18762898
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18763241 by charles derousiers in ue5-main branch]
2022-01-27 17:03:57 -05:00
andrew davidson
3542cab338 FMatrix explicit cast fixes - Renderer
#rb ben.ingram, zak.middleton
#preflight 61f285e71e5d78c38307cda4

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18752245 in //UE5/Release-5.0/... via CL 18752267 via CL 18752335
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18752338 by andrew davidson in ue5-main branch]
2022-01-27 07:20:20 -05:00
zak middleton
36c99f6887 #ue5 - LWC: FVector4f <-> FVector4d conversion is now explicit.
FLinearColor has also been modified to make any double->float conversions explicit. Previously all 3D TVector versions were allowed to be implicit and thus could convert TVector<double> => FLinearColor => TVector4<float>.

Fixed up all engine and game casts. Added "//LWC_TODO: precision loss" around any explicit casts that previously were silently explicit and we may need to revisit for precision loss analysis.

#jira UE-122085
#rb Ben.Ingram, Andrew.Davidson
#preflight 61f24af473238441cb7bb0f1

#ROBOMERGE-AUTHOR: zak.middleton
#ROBOMERGE-SOURCE: CL 18751249 in //UE5/Release-5.0/... via CL 18751253 via CL 18751319
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18751326 by zak middleton in ue5-main branch]
2022-01-27 03:30:41 -05:00
Charles deRousiers
57d0114325 Ensure stencil buffer is always clear for sub-pixel shadow mask (i.e. for hair strands).
#rb none
#jira UE-139450
#preflight 61f01f64ff453b751b33a43d

[CL 18723323 by Charles deRousiers in ue5-main branch]
2022-01-25 11:19:28 -05:00
jules blok
0e2e7ff8bd Fix incorrect shadow rendering viewport for ISR
#rb steve.smith
#preflight 61ef2aab3154b79507cee6ec

#ROBOMERGE-AUTHOR: jules.blok
#ROBOMERGE-SOURCE: CL 18716263 in //UE5/Release-5.0/... via CL 18716279 via CL 18716385
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18717185 by jules blok in ue5-main branch]
2022-01-24 19:04:11 -05:00
charles derousiers
52713beaf5 Fix failing hair & fur EngineTests.
Reference stencil value was invalid for static directional light.

#rb none
#jira UE-138765
#preflight 61e53914904123989a093904

#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 18631400 in //UE5/Release-5.0/... via CL 18631658 via CL 18631681
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18636670 by charles derousiers in ue5-main branch]
2022-01-17 23:59:03 -05:00
jules blok
732e637f62 Fix renderer issues when rendering multiple ISR passes.
- New functions are added to get the Primary View or all Secondary Views and takes advantage of that to replace hardcoded indices.
- Added support for retrieving a monoscopic projection/pose from IStereoRendering when a single frustum is needed for culling purposes.

#rb Steve.Smith
#rb Jeff.Fisher
#rb Zach.Bethel
#preflight 61de16e96a076ddb53cf59b4

#ROBOMERGE-AUTHOR: jules.blok
#ROBOMERGE-SOURCE: CL 18579012 in //UE5/Release-5.0/... via CL 18579021 via CL 18579025
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18579042 by jules blok in ue5-main branch]
2022-01-11 19:03:42 -05:00
UnrealBot
c47e81b2cb Branch snapshot for CL 18531810
[CL 18531810 in ue5-main branch]
2022-01-06 16:44:09 +00:00
UnrealBot
2987349d36 Branch snapshot for CL 18514113
[CL 18514113 in ue5-main branch]
2022-01-05 20:41:17 +00:00
charles derousiers
16acb4ad18 Fix static pre-shadow applied onto hair strands geometry.
#rb none
#jira UE-121320
#preflight 61d5d5f1932a02483cc76fb9

#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 18520874 in //UE5/Release-5.0/... via CL 18520877
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18520891 by charles derousiers in ue5-release-engine-test branch]
2022-01-05 12:44:50 -05:00