Commit Graph

5292 Commits

Author SHA1 Message Date
Ben Ingram
798eda41a9 Fix compile with LWC enabled
#rb none
#jira none

[CL 16650218 by Ben Ingram in ue5-main branch]
2021-06-11 21:06:07 -04:00
Florin Pascu
765b14e43b RG11B10 + SceneDepthAux 16/32F + Alpha Propagate
For Forward ES31
 Default SceneColor RG11B10 + R16F\32F Depth texture
 With PropagateAlpha on RGBA16F + R16F\32F
 PostProcess we sample SceneDepthAux for Depth
For Deferred ES31
 SceneDepthAux only for Metal
 PropagateAlpha not working yet
 PostProcess we sample SceneDepthTexture for Depth

cvar to change Depth texture from 16 to 32Fr.Mobile.SceneDepthAux
cvar for AlphaPropagate r.Mobile.PropagateAlpha
#jira UE-98033
#rb Dmitriy.Dyomin, Carl.Lloyd, Jack.Porter

[CL 16644095 by Florin Pascu in ue5-main branch]
2021-06-11 13:46:35 -04:00
krzysztof narkowicz
7b2f48e751 Lumen - split r.LumenScene.SurfaceCache.Reset debug utility into:
r.LumenScene.SurfaceCache.Reset - one time reset
r.LumenScene.SurfaceCache.ResetEveryNthFrame - reset every N-th frame

[FYI] Patrick.Kelly, Daniel.Wright


#ROBOMERGE-SOURCE: CL 16641209
#ROBOMERGE-BOT: (v831-16623017)

[CL 16641217 by krzysztof narkowicz in ue5-main branch]
2021-06-11 10:29:45 -04:00
krzysztof narkowicz
c258112e43 Lumen - fixed various surface cache precision issues (e.g. shadow bias issues) by replacing heavily compressed 8bit depth with an uncompressed 16 bit depth
#ROBOMERGE-SOURCE: CL 16641022
#ROBOMERGE-BOT: (v831-16623017)

[CL 16641027 by krzysztof narkowicz in ue5-main branch]
2021-06-11 10:16:21 -04:00
charles derousiers
3db3266795 Fix invalid cluster AABB when culling is enabled.
The cluster AABB update can run onto non-initialized data due to the cluster info not being filled by the culling pass, if this one does not happen/or has culled the particular cluster, causing GPU crashes.

#rb none


#ROBOMERGE-SOURCE: CL 16640350
#ROBOMERGE-BOT: (v831-16623017)

[CL 16640391 by charles derousiers in ue5-main branch]
2021-06-11 08:44:29 -04:00
graham wihlidal
a4fbfe939b Fixed broken velocity vectors
#ROBOMERGE-SOURCE: CL 16638081
#ROBOMERGE-BOT: (v831-16623017)

[CL 16638096 by graham wihlidal in ue5-main branch]
2021-06-11 03:38:54 -04:00
Dmitriy Dyomin
676a32f229 Fixed mobile specific issues when project has GPUScene enabled
[CL 16638001 by Dmitriy Dyomin in ue5-main branch]
2021-06-11 03:34:04 -04:00
chris kulla
f1b32af777 Restore changes to PathTracing code caused by the last engine merge
#rb Aurel.Cordonnier

[CL 16635840 by chris kulla in ue5-main branch]
2021-06-10 23:00:24 -04:00
krzysztof narkowicz
5f36a80796 Lumen - fixed surface cache normals artifacts caused by octahedral world space normal interpolation. Switched encoding from world space octahedral normals to local (card) space XY normals. Storing the hemisphere should be mostly fine with an ortho projection and anyway something pointing away shouldn't be really projected onto a surface.
#ROBOMERGE-SOURCE: CL 16635832
#ROBOMERGE-BOT: (v831-16623017)

[CL 16635835 by krzysztof narkowicz in ue5-main branch]
2021-06-10 22:59:58 -04:00
christopher waters
c79dc6dafd Improving the occlusion culling parallel code path.
#jira none
#rb zach.bethel
#preflight 60c25c42c612640001d3bd6a

[CL 16632735 by christopher waters in ue5-main branch]
2021-06-10 19:10:06 -04:00
ola olsson
5560667259 Tracking GPU-Scene dirty state and specialize Primitive Id only updates to avoid redundant uploads.
- Added instance data validation
- Added general load balancer for instance processing on GPU (will move to own files later)
- Added initial GPU-side write access API for GPU scene.
- Addded specialized kernel to update primitive IDs in instances when that is the only change.

#rb graham.wihlidal
#jira UE-116671
#preflight 60c25d7b1264df0001aab80b


#ROBOMERGE-SOURCE: CL 16628528
#ROBOMERGE-BOT: (v831-16623017)

[CL 16628539 by ola olsson in ue5-main branch]
2021-06-10 15:46:35 -04:00
aurel cordonnier
e0ad4e25df Merge from Release-Engine-Test @ 16624776 to UE5/Main
This represents UE4/Main @ 16579691 and Dev-PerfTest @ 16579576

[CL 16625248 by aurel cordonnier in ue5-main branch]
2021-06-10 13:13:24 -04:00
krzysztof narkowicz
249140a8d6 Lumen - switched FPrimitiveGroup::WorldSpaceBoundingBox from FBox to FRenderBounds in order to not store a bValid flag per every group
#ROBOMERGE-SOURCE: CL 16625122
#ROBOMERGE-BOT: (v831-16623017)

[CL 16625132 by krzysztof narkowicz in ue5-main branch]
2021-06-10 13:04:00 -04:00
Dmitriy Dyomin
d2844cee0c Make sure instance culling always initializes dummy resources on mobile
#rb none

[CL 16624061 by Dmitriy Dyomin in ue5-main branch]
2021-06-10 11:33:36 -04:00
guillaume abadie
daf02cf5f2 Separates TSR source code from TAA
#rb none
[FYI] wei.liu


#ROBOMERGE-SOURCE: CL 16621853
#ROBOMERGE-BOT: (v830-16605563)

[CL 16621862 by guillaume abadie in ue5-main branch]
2021-06-10 08:42:21 -04:00
guillaume abadie
98b22e51ce Adds CFLAG_ForceOptimization on FDiffuseIndirectCompositeCS
#rb none


#ROBOMERGE-SOURCE: CL 16621419
#ROBOMERGE-BOT: (v830-16605563)

[CL 16621422 by guillaume abadie in ue5-main branch]
2021-06-10 08:11:16 -04:00
guillaume abadie
725d772cca Implements r.TemporalAA.EnableResponsiveAA
#rb none


#ROBOMERGE-SOURCE: CL 16621178
#ROBOMERGE-BOT: (v830-16605563)

[CL 16621195 by guillaume abadie in ue5-main branch]
2021-06-10 07:57:02 -04:00
Ola Olsson
fc32cccb91 Fix crash in batched instance culling from using null VisibleInstanceFlags when the scene is empty
- also removed some dead code (debug code that was inactive)

#jira UE-117650
#rb rune.stubbe
#preflight 60c1e70f1ab0310001af32ff

[CL 16620830 by Ola Olsson in ue5-main branch]
2021-06-10 07:30:33 -04:00
patrick kelly
a9d8323d66 Correcting RHI_RAYTRACING guards
#rb none


#ROBOMERGE-SOURCE: CL 16618456
#ROBOMERGE-BOT: (v828-16531559)

[CL 16618460 by patrick kelly in ue5-main branch]
2021-06-09 23:10:56 -04:00
patrick kelly
37ad9aeef4 Hardware ray tracing support for LumenSceneDirectLighting.
The previous method has been replaced with a tiled work queue system.
At the high-level, Lumen cards are dispatched against a batch group of N lights (default=16).
Cards are chopped into 8x8 tiles of work, corresponding to the minimum Lumen card size, and subject to temporal and light culling.
Tiles which pass the culling stages are submitted to the raygen shader, where visibility is determined per light and stored in a 32-bit shadow mask.
Virtual shadow mask lookup was added as a potential late-time culling criteria in the ray-gen shader, but did not provide any noticeable traversal speedup. It is currently permuted out.
The shadow mask is applied as the visibility score to the direct lighting stage and used for off-screen shadowing.

r.LumenScene.DirectLighting.HardwareRayTracing (default=1)

Timing results for a single frame in Sun Temple with r.LumenScene.Lighting.ForceLightingUpdate=1 & r.LumenScene.DirectLighting.ForceOffscreenShadowing=1
Software Ray Tracing: 9.20ms
Hardware Ray Tracing: 8.16ms

Under normall circumstances, r.LumenScene.DirectLighting.ForceOffscreenShadowing=0 and provides a significant speedup for software tracing:
Software Ray Tracing: 4.83ms
Hardware Ray Tracing: 8.16ms

We expect to reclaim some speedup for hardware ray tracing by reordering the pipeline such that virtual shadow mapping can pre-populate the shadow mask and act as a more performant culling criteria.

#rb krzysztof.narkowicz


#ROBOMERGE-SOURCE: CL 16618392
#ROBOMERGE-BOT: (v828-16531559)

[CL 16618400 by patrick kelly in ue5-main branch]
2021-06-09 23:00:32 -04:00
graham wihlidal
4ec3fc585b Removed LocalToWorld and PrevLocalToWorld from FPrimitiveInstance (instead the concatenating of instance and primitive transforms happens during SoA construction right before GPU Scene upload). In the future we'll also have a custom GPU Scene upload kernel that can do things like the concatentation (among other derivations) right on the GPU, but not affect the hot path of stuff like GetInstanceData(). This change also renames (Prev)InstanceToLocal to (Prev)LocalToPrimitive to make a lot more sense than the previous naming.
#rb ola.olsson, krzysztof.narkowicz, rune.stubbe
[FYI] brian.karis, jason.nadro


#ROBOMERGE-SOURCE: CL 16614552
#ROBOMERGE-BOT: (v828-16531559)

[CL 16614986 by graham wihlidal in ue5-main branch]
2021-06-09 19:08:26 -04:00
luke thatcher
d3ba183573 Fix memory stomp in SystemTextures.cpp
- AsciiTexture initialization writes past the end of the RHI allocation
 - Loop was written as though the pixel format of the texture is PF_RGBA8, but is actually PF_R8, causing a 3 byte stomp at the end of the allocation.

#rb Andy.Firth
[FYI] charles.derousiers


#ROBOMERGE-SOURCE: CL 16613356
#ROBOMERGE-BOT: (v828-16531559)

[CL 16614308 by luke thatcher in ue5-main branch]
2021-06-09 18:18:08 -04:00
christopher waters
17e4707703 Adding CreateUploadBuffer helpers.
Adding FRDGUploadData to create upload data directly from the GraphBuilder persistent memory.

#jira none
#rb Zach.Bethel
#preflight 60c0de551264df00015e307a

[CL 16613071 by christopher waters in ue5-main branch]
2021-06-09 17:17:23 -04:00
Ben Ingram
69340a02bd LWC - fix case of aliasing doubles as floats
#rb none
#jira UE-117476

[CL 16612009 by Ben Ingram in ue5-main branch]
2021-06-09 16:36:12 -04:00
charles derousiers
a5ec376c58 Change ShaderDraw API to be less verbose.
#rb none


#ROBOMERGE-SOURCE: CL 16608256
#ROBOMERGE-BOT: (v828-16531559)

[CL 16608278 by charles derousiers in ue5-main branch]
2021-06-09 13:17:13 -04:00