Commit Graph

648 Commits

Author SHA1 Message Date
Sebastien Hillaire
92c8937e37 Added sky atmosphere transmittance on forward shaded translucent when per pixel mode is selected on the atmospoheric dir light.
#rb none
#preflight https://horde.devtools.epicgames.com/job/62960217d86c0bf739a111ef

[CL 20435765 by Sebastien Hillaire in ue5-main branch]
2022-05-31 08:11:24 -04:00
Guillaume Abadie
bbb8d0e2c8 Rewrites dynamic resolution on top of the DynamicRenderScaling API
#rb none
#jira UE-152561
#preflight 628f43e6f622d972b5cb4f2f

[CL 20377247 by Guillaume Abadie in ue5-main branch]
2022-05-26 05:34:08 -04:00
Guillaume Abadie
0734868f53 Implements DynamicRenderScaling API with GPU timing measurement integrated within RDG
This allows to define a new dynamic scaling in the renderer with low amount of boiler plate:

DynamicRenderScaling::FHeuristicSettings GetDynamicTranslucencyResolutionSettings()
{
	RenderingDynamicScaling::FHeuristicSettings BucketSetting;
	BucketSetting.Model = RenderingDynamicScaling::EHeuristicModel::Quadratic;
	BucketSetting.bModelScalesWithPrimaryScreenPercentage = true;
	BucketSetting.MinResolutionFraction = ...
	...
	return BucketSetting;
}

DynamicRenderScaling::FBudget GDynamicTranslucencyResolution(TEXT("DynamicTranslucencyResolution"), &GetDynamicTranslucencyResolutionSettings);


And then simply define a scope to measure the GPU timing as such:

{
	DynamicRenderScaling::FRDGScope DynamicTranslucencyResolutionScope(GraphBuilder, GDynamicTranslucencyResolution);

	// add passes to GraphBuilder
}

#rb zach.bethel
#jira UE-152561
#preflight 628f1219bb14235aa38c904c

[CL 20376428 by Guillaume Abadie in ue5-main branch]
2022-05-26 01:58:36 -04:00
zach bethel
50b6956d6a Ported IrradianceEnvironmentMap to RDG.
#preflight 628d31a3c97e4beea3ad4e21
#rb sebastien.hillaire

[CL 20370328 by zach bethel in ue5-main branch]
2022-05-25 15:53:11 -04:00
Sebastien Hillaire
9fd23df00a Strata - fix for editor primitives not showing up when strata visualize is enabled.
#rb none
#preflight https://horde.devtools.epicgames.com/job/628c8111a24685c36f4ecea9
#fyi charles.derousiers

[CL 20344926 by Sebastien Hillaire in ue5-main branch]
2022-05-24 03:19:52 -04:00
jason hoerner
33e4405d4d Multi-view-family: need to call pre-render view extensions for all view families.
#jira UE-150976
#rnx
#rb jason.nadro
#preflight 628bb908f1421422ea771ae0

[CL 20331840 by jason hoerner in ue5-main branch]
2022-05-23 13:20:21 -04:00
Jeremy Moore
e8b5823402 #jira UE-151539
Support velocity for WPO on static objects.
Support Optimized WPO on all actors, not just nanite.
Optimized WPO now also affects WPO velocity.
Moved logic for forcing velocity output to proxy init and removed from view.
Update all proxies when force velocity output CVar changes.
Used nicer mechanism to update all proxies when CVar changes for r.Velocity.EnableVertexDeformation.
Disable bEvaluateWorldPositionOffset UI unless Optimized WPO is enabled.
#preflight 6284e958925bbe69dfd26af2
#fyi graham.wihlidal

[CL 20268399 by Jeremy Moore in ue5-main branch]
2022-05-18 17:01:25 -04:00
zach bethel
3cc87760bd Removed cases of AddCopyToResolveTargetPass which either weren't necessary or weren't performing multisample resolves.
#preflight 628270aa046b81bf93c13e50

[CL 20226032 by zach bethel in ue5-main branch]
2022-05-16 12:09:51 -04:00
Andriy Tylychko
d6e66144b2 fixed undefined order of static destruction for FSceneRenderer::OcclusionSubmittedFence
#preflight 627e620d7c26e247734d2d70

[CL 20180722 by Andriy Tylychko in ue5-main branch]
2022-05-13 10:02:16 -04:00
Wei Liu
355707489e Refactor of mobile custom depth/stencil to line up with pc on all mobile platform.
#jira none

#rb Dmitriy.Dyomin
#fyi Serge.Bernier
#preflight 627b87a65d003338d95018bf

[CL 20135905 by Wei Liu in ue5-main branch]
2022-05-11 06:10:52 -04:00
john huelin
95c1680b6e Fix DrawCallCount per pass not working when multithreaded RHI command recording is enabled.
[REVIEW]
#rnx

#ROBOMERGE-OWNER: john.huelin
#ROBOMERGE-AUTHOR: john.huelin
#ROBOMERGE-SOURCE: CL 20105654 via CL 20105671 via CL 20107113 via CL 20107146
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20110543 by john huelin in ue5-main branch]
2022-05-09 16:35:01 -04:00
jason hoerner
0d8f039883 Multi-view multi-gpu, scene rendering perf improvements for Virtual Production.
* Fence wait for cross GPU resource transfers can now be deferred.  Moved the wait for view family render target transfers to the end of all view family rendering.  Saves a few ms GPU in stalls in the Valley project.  The fence wait is marked with a different GPU stat scope, so it can be differentiated from the transfer workload.
* Ray tracing scene update now runs once, for the first view family only.  Saves around 1.2 ms GPU when three views are present.
* Added logic to sort the largest view families to run first, which tend to be the inner frustum, and are usually the bottleneck for the entire frame.  This improves scheduling, saving around 1.0 ms GPU.
* Avoid CPU stalls where Render Thread waits on RHI Thread, by only running "SetFlushResourcesRHI()" on the first view family.  Can save multiple ms when CPU bound.

This is part of ongoing multi-view-family scene render refactor work, where these improvements were made possible by the refactor.

#jira none
#rnx
#rb zach.bethel jason.nadro
#preflight 6272cef4ec1566a7062f20c4

[CL 20059593 by jason hoerner in ue5-main branch]
2022-05-05 12:33:00 -04:00
tiago costa
adedecfd54 Support multiple layers in FRayTracingScene.
- Updated places accessing TLAS SRV to use ERayTracingSceneLayer::Base

#rb yuriy.odonnell
#preflight 62728a70ec1566a70616ac9a

[CL 20041705 by tiago costa in ue5-main branch]
2022-05-04 10:41:10 -04:00
zach bethel
94dae5bea0 Ported GPU scene buffers to RDG.
#rb Krysztof.narkowicz
#preflight 627149d0fe09c0cfbc3c7bdd

[CL 20027095 by zach bethel in ue5-main branch]
2022-05-03 12:08:20 -04:00
carl lloyd
73c8996430 Mobile GL Deferred ReflectionCapture UBO fix (passed too many elements and hit the GL limit)
#rb Zach.Bethal, Dmitriy.Dyomin
#preflight 626a69d52d28b9d0f7831abc

[CL 19957425 by carl lloyd in ue5-main branch]
2022-04-28 06:34:43 -04:00
jason hoerner
beace4d5ec Hack fix for crashes related to multi-view-family rendering refactor. Need to handle FViewInfo::SetupUniformBufferParameters called on manually constructed FViewInfo structures in a couple code paths outside the scene renderer (FRendererModule::DrawTileMesh, FNiagaraGpuComputeDispatch::ProcessPendingTicksFlush). I plan a better code fix which will involve avoiding access to the global variable FSceneTexturesConfig, which isn't multi-view-family safe, and instead computing the data when it isn't available from the view family.
#jira UE-150068 UE-150324
#rnx
#rb zachary.bethel
#preflight 626864e9853fdb6fddd84ebb

[CL 19930315 by jason hoerner in ue5-main branch]
2022-04-26 18:13:12 -04:00
Patrick Enfedaque
ec70181ddf Fix crash in FViewInfo::SetupUniformBufferParameters (when GetRendererModule().InitializeSystemTextures hasn't been called)
#jira none
#rb charles.derousiers
#preflight skip
#rnx

[CL 19920407 by Patrick Enfedaque in ue5-main branch]
2022-04-26 11:06:36 -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
dave jones2
1d36b62d36 UE-148463 - Update cumulative time tracking Engine variables to doubles
As a part of the LWC work, this change primarily focues on updating FGameTime and UWorld to use doubles for accumulated time. Note that time deltas will remain as floats.

Additionally:

* A few time-related BP functions were updated to use doubles where appropriate. as well as the FRenderThreadUpdateContext struct for the Slate renderer.
* Some compilation errors were also fixed due to the change.
* Minor changes of float literals to drop the 'f' suffix.

#rb andrew.davidson
#jira UE-148463
#preflight 62603748e30cb43e8cbf2aa7

[CL 19866207 by dave jones2 in ue5-main branch]
2022-04-22 11:57:28 -04:00
Tiantian Xie
d3948477f0 Automatically change to spatial upscale when subsurface scattering visualization is enabled to fix visualization regression.
#jira UE-148932
#rb none
#preflight 6261bb007d162829ae8a0c43

[CL 19855410 by Tiantian Xie in ue5-main branch]
2022-04-21 16:36:24 -04:00
Jules Blok
e3374bb683 Fix viewports being handled incorrectly if there are multiple ISR pairs.
InstancedStereoWidth is already a view property, but is currently simply set to the widest pair.
This CL properly computes InstancedStereoWidth for each pair individually.

#rb arciel.rekman
#jira UE-149773
#preflight 62608172dd47b4ad218b7584
#preflight 626094ba886befa9a5d09c6e

[CL 19841467 by Jules Blok in ue5-main branch]
2022-04-20 19:34:24 -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
Sebastien Hillaire
e65805b1e9 Added a separated start distance for volumetric fog on exponential fog.
The volumetric fog view distance is now taken into account as distance after the start distance.

#rb none
#jira https://jira.it.epicgames.com/browse/FORT-462063
#preflight https://horde.devtools.epicgames.com/job/6255441088356cf43f0c2351
# jordan.walker, patrick.kelly

[CL 19718428 by Sebastien Hillaire in ue5-main branch]
2022-04-12 05:32:22 -04:00
Michael Forot
bc2b4b1d21 Add scalability to the field clipmap construction
#rb kriss.gossart
#jira FORT-398971
#preflight 624ea8948d1db441a92c8536

[CL 19669844 by Michael Forot in ue5-main branch]
2022-04-07 11:13:00 -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