Commit Graph

515 Commits

Author SHA1 Message Date
chris kulla
3dada130b2 Path Tracer: invalidate path traced output when decals are added, removed or transformed
#rb Tiago.Costa
#preflight 628fc6f48c077c0d661f7993

[CL 20383655 by chris kulla in ue5-main branch]
2022-05-26 15:26:34 -04:00
Guillaume Abadie
46a784ccaa Rewrites dynamic translucency resolution on top of the DynamicRenderScaling API
#rb none
#jira UE-152561
#preflight 628f49d99d313ae1c7ddf9a8

[CL 20377304 by Guillaume Abadie in ue5-main branch]
2022-05-26 05:54:01 -04:00
jason hoerner
a3c39d3fd0 Suppress static analysis error for potentially leaked virtual shadow map cache pointer. Allocation is stored to the FSceneViewState class and freed later with that class.
#jira UE-154057
#rnx
#preflight 628ec12389000256cea3a6b6

[CL 20373826 by jason hoerner in ue5-main branch]
2022-05-25 20:01:07 -04:00
chris kulla
b160f56ebf Path Tracer: Avoid invalidating the path tracer when a moveable light transform has been set but did not actually change
#rb none
#preflight 628e7b3b9a2b52f7c7ea8e71

[CL 20369701 by chris kulla in ue5-main branch]
2022-05-25 15:08:02 -04:00
jeremy moore
9a2a27c191 Fully remove velocity data for a primitive when it stops moving.
Without this when static components are moved in editor they continue to write velocity after they stop moving.
This can be extra bad if the component was snapped to a final location so that it writes a bad velocity.
#preflight 628d547baf76b78af553c18c

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 20357954 via CL 20357959 via CL 20357973
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20359821 by jeremy moore in ue5-main branch]
2022-05-24 23:00:11 -04:00
jason hoerner
0267d53323 DisplayCluster: Virtual Shadow Map cache can optionally be allocated per view, and enabled that feature for Virtual Production. Significant performance win by avoiding constant cache thrashing when rendering multiple families. Frame time goes from ~45 ms to ~26 ms for Valley test scene (Node 2), GPU bound in both cases. Separate cache per view isn't implemented for split screen views (single view family with multiple views), but Virtual Production doesn't use that, and support for that could be added in the future.
#jira UE-142732
#rb andrew.lauritzen ola.olsson
#preflight 628d06a45c3ef99a7b2fffa3

[CL 20351116 by jason hoerner in ue5-main branch]
2022-05-24 13:17:13 -04:00
tiago costa
6bab03401c Store bounds in FDeferredDecalProxy.
#rb jeremy.moore
#preflight 628ccf7d5665463c2103f227

[CL 20347024 by tiago costa in ue5-main branch]
2022-05-24 09:01:11 -04:00
chris kulla
4ed0b05095 Path Tracer: Fix moveable lights not invalidating the path tracer
#rb trivial
#preflight 628c0ea4183c1e134658abb5

[CL 20340950 by chris kulla in ue5-main branch]
2022-05-23 18:55:27 -04:00
Jeremy Moore
ff967b1163 Remove PRIMITIVE_SCENE_DATA_FLAG_DRAWS_VELOCITY and only use PRIMITIVE_SCENE_DATA_FLAG_OUTPUT_VELOCITY.
Tidy up use of FPrimitiveSceneProxy velocity getters.
Now DrawsVelocity() is only for velocity relevance.
And HasDynamicTransform() is for determining if we need to store previous transform state.
VSM caching was using PRIMITIVE_SCENE_DATA_FLAG_DRAWS_VELOCITY so replaced that with PRIMITIVE_SCENE_DATA_FLAG_SHOULD_CACHE_SHADOW which should use the old behavior and can be tweaked in future using ShouldCacheShadow().

A common pattern for determining whether to output velocity now is to check if a previous transform exists, and to OR in AlwaysHasVelocity().
I found some proxy types that don't check for previous transform.
Also I found that the debug physics aggregate types *never* check for previous transform.
These are pre-existing potential bugs for fixing in another pass.

Also I found some proxies that don't currently fill out velocity relevance.
These are pre-existing potential bugs for fixing in another pass.

#preflight 62863f789016c6dd897f1cd2
#fyi andrew.lauritzen

[CL 20279797 by Jeremy Moore in ue5-main branch]
2022-05-19 10:08:15 -04:00
tiago costa
173ad484d8 Added more checks when removing primitives from DistanceField scene.
#jira UE-150842
#preflight 627ce7c1ce4192efbe2b75f7

[CL 20163019 by tiago costa in ue5-main branch]
2022-05-12 07:12:16 -04:00
Yuriy ODonnell
32ebaf5460 Fix crash when r.RayTracing.Shadows is enabled dynamically
Previously FScene contained an array of RT-shadowed lights which was updated when a light is added/removed.
However, this is incorrect as the light RT shadow state depends on CVars that may be changed dynamically.

The solution is to check if the scene currently contains any RT-shadowed lights during rendering. This is more expensive but robust.
The array of RT-shadowed lights is removed as it was not used beyond checking if it's empty.

#rb juan.canada
#preflight 6271aa653e1f2a9d3a4dd84c

[CL 20041248 by Yuriy ODonnell in ue5-main branch]
2022-05-04 10:05:02 -04:00
dmitriy dyomin
a0e1301214 Remove vulkan overly conservative barriers on UB upload introduced in CL#20006576
Mark mobile directional light UBs as SingleFrame since they are updated every frame and should use ring buffer
#rb none

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 20038889 via CL 20038910 via CL 20038914 via CL 20038922 via CL 20038926
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20039254 by dmitriy dyomin in ue5-main branch]
2022-05-04 05:37:02 -04:00
aleksander netzel
8cca334fdf Use MinDrawDistance in ray tracing cullling:
* Objects that are in front of camera will be culled if they are closer than MinDrawDistance.
* Controlled by r.RayTracing.Culling.UseMinDrawDistance (disabled by default for now).

#rb Juan.Canada
#preflight 62611dba731f07cd5cc66930

#ROBOMERGE-AUTHOR: aleksander.netzel
#ROBOMERGE-SOURCE: CL 19846165 via CL 19846200 via CL 19846207
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19846535 by aleksander netzel in ue5-main branch]
2022-04-21 06:46:23 -04:00
chris kulla
1fbc0a606e PathTracer: improve filtering of which scene proxies should impact path tracer invalidation
#rb Juan.Canada
#preflight 625dd2b548670f31a62ac20c

[CL 19794875 by chris kulla in ue5-main branch]
2022-04-18 17:11:11 -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
rtrick
4ecbb1ce26 PR #8520: Fix for Reflection Captures sometimes showing up black in packaged game. (Contributed by rtrick)
#ushell-cherrypick of 17834874 by UnrealBot

#jira UE-131950
#preflight 624dd34f8e5ae00f0acc7a58
#rb none

[CL 19670744 by rtrick in ue5-main branch]
2022-04-07 11:53:12 -04:00
chris kulla
5e4ac8d493 Path Tracer: Fix missing scene invalidations when changing skylight or moving atmosphere/fog components
#rb Juan.Canada
#preflight 624725c8c667881bf408f351

[CL 19590290 by chris kulla in ue5-main branch]
2022-04-01 12:34:53 -04:00
graham wihlidal
9c8fa1c395 Implemented a GPU Scene API for primitives explicitly enabling/disabling WPO support driven by events. This will be important for disabling WPO overhead in Nanite and other systems when unnecessary. The material system MayModifyMeshPosition hints are insufficient when using an MICD with static params that ultimately disable WPO, but the material system still reports WPO usage. This hint can also be used in new LOD systems to disable expensive features like WPO in the distance, but without doing a full shader switch. Nanite now supports a debug view that shows WPO off (red) and on (green) for meshes in the scene (r.Nanite.Visualize EvaluateWPO).
This change also remaps the original bEvaluateWorldPositionOffset on SMC into bEvaluateWorldPositionOffsetInRayTracing, because this var was only ever driven by ray tracing specific methods. The original bEvaluateWorldPositionOffset is now used by this more generic API.

Lastly, a new cvar (r.OptimizedWPO) has been added that indicates if the hint should be respected or not (default is false, which means WPO is always active, regardless of hint)

#rb rune.stubbe, marc.audy, derek.ehrman
[FYI] brian.karis, jamie.hayes, ola.olsson, andrew.lauritzen, jian.ru
#preflight 6244a8dcdc6183e3f5f8de98

#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 19564957 via CL 19564973 via CL 19564978
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19566743 by graham wihlidal in ue5-main branch]
2022-03-30 19:41:19 -04:00
jordan cristiano
96ed72f430 20.10+ edition of CL 19329805 and 19348386. Changed to only create lighting interactions if there are lighting channels enabled.
#rb evgenii.babinets
[FYI] daniel.wright, krzysztof.narkowicz

#ROBOMERGE-AUTHOR: jordan.cristiano
#ROBOMERGE-SOURCE: CL 19484895 via CL 19485054 via CL 19486925 via CL 19496864 via CL 19497210
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v936-19480137)

[CL 19498492 by jordan cristiano in ue5-main branch]
2022-03-24 13:30:54 -04:00
ben ingram
825090a44a Change octree extent from WORLD_MAX to HALF_WORLD_MAX. The value was previously reverted from LWC_WORLD_MAX to WORLD_MAX, when in fact the original value should have been HALF_WORLD_MAX
#rb kevin.ortegren
#jira UE-142823
#preflight 62278a06e83598518f37cae1

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 19304871 in //UE5/Release-5.0/... via CL 19306234
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19347197 by ben ingram in ue5-main branch]
2022-03-10 21:06:20 -05:00
tiago costa
e01a204611 Get instance transforms of Primitives supporting ERayTracingPrimitiveFlags::CacheInstances from GPUScene.
- Avoid extra copy and upload of transforms.
- Added FRayTracingGeometryInstance::BaseInstanceSceneDataOffset to skip creating an array of instance data offsets when they are continuous.
- Saves around 50MB on CitySample.

#rb yuriy.odonnell
#preflight 6225f85bb97fb949cf3518fa

[CL 19302183 by tiago costa in ue5-main branch]
2022-03-08 09:20:04 -05:00
chris kulla
1c08d0fe41 Improve path tracer invalidation through transform changes to reduce the number of spurious invalidations
Rather than performing the change detection on the game thread, perform it only for the rendering primitive that might impact the path tracer. In particular, this avoids updates to the static meshes representing cameras. The camera transforms are handled on a per view basis, which means cameras not being moved will not have their output invalidated.

#jira UE-143951
#preflight 62200f6c943787f1d21ae666
#rb Alejandro.Arango,Simon.Therriault
#lockdown Juan.Canada

#ROBOMERGE-AUTHOR: chris.kulla
#ROBOMERGE-SOURCE: CL 19245026 in //UE5/Release-5.0/... via CL 19249057
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v924-19243027)

[CL 19262938 by chris kulla in ue5-main branch]
2022-03-04 03:05:02 -05:00
Sebastien Hillaire
264b8a1022 Cloud component samples now all default to 1.
Configurable real time capture with respect to cost/latency: sky and cloud captures can be timesliced per face now.
Fixed potential issue in deprecated SetXXX fucntions.
Removed advanced tag from sample count because those are too important to hide by default.

#rb Daniel.Wright
#preflight 62206f4537049be5174a1215

[CL 19239678 by Sebastien Hillaire in ue5-main branch]
2022-03-03 02:47:58 -05:00
jack porter
ac87efeae3 Added mobile shader permutation cvar to support bSupportStaticLighting=true with Force No Precomputed Lighting enabled on a level
#jira UE-143323
#rb Dmitriy.Dyomin
#preflight 6215ffcd9e113332ba5998e1
#preflight 621632a8bd3bdd9086d2f5f8


#ROBOMERGE-AUTHOR: jack.porter
#ROBOMERGE-SOURCE: CL 19089743 via CL 19092602 via CL 19094313 via CL 19095775 via CL 19101841
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19141863 by jack porter in ue5-main branch]
2022-02-25 00:10:44 -05:00
chris kulla
11ebcdcd68 Fix path tracer updates not working over nDisplay and in the editor's Picture-in-picture camera previews.
* Invalidate Path Traced output when component transforms change (this catches cases that don't re-create a primitive info object)
 * Invalidate Path Traced output when light color or intensity changes
 * Fix invalidation in a scene only affecting a single view (or view family). Instead of a single boolean, the scene now keeps a counter that ticks on changes and each view remembers the last value of this counter to detect changes.

#jira UE-124715
#rb Ryan.Vance,Juan.Canada
#lockdown Juan.Canada
#preflight 6210149c676ae0301347db71


#ROBOMERGE-AUTHOR: chris.kulla
#ROBOMERGE-SOURCE: CL 19087008 via CL 19092565 via CL 19092634 via CL 19093389 via CL 19101802
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19141734 by chris kulla in ue5-main branch]
2022-02-25 00:02:42 -05:00