Commit Graph

355 Commits

Author SHA1 Message Date
guillaume abadie
c1819a0532 Implements r.AntiAliasingMethod
#rb none
#preflight 60d33c8cd9586b000132acac


#ROBOMERGE-SOURCE: CL 16758022
#ROBOMERGE-BOT: (v835-16672529)

[CL 16758023 by guillaume abadie in ue5-main branch]
2021-06-23 11:38:33 -04:00
Ola Olsson
b04abe5285 Make shader draw / shader print more consistent
- add IsSupported to ShaderDebug API
 - cleaned up some potentially unsafe uses of IsSupported/IsEnabled to guards shader parameter setting
 - added AddOBB to ShaderDrawDebug
 - Removed restriction that limited shaderdraw to editor-only

#rb sebastien.hillaire,charles.derousiers
#preflight
#preflight 60cc957a367e670001ca06ab

[CL 16718178 by Ola Olsson in ue5-main branch]
2021-06-18 09:21:33 -04:00
Jian Ru
6930d8a438 Reuse previous frame SceneColorHalfRes for scene color downsample output instead of creating a new one. This prevents having two non-transient SceneColorHalfRes textures allocated on fast VRAM
#jira UE-117189
#rb ben.woodhouse

[CL 16717026 by Jian Ru in ue5-main branch]
2021-06-18 01:37:20 -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
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
charles derousiers
7d8bcb8556 Rename GpuDebugRendering -> ShaderDebug to be consistent with ShaderPrint.
#rb none


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

[CL 16606856 by charles derousiers in ue5-main branch]
2021-06-09 12:16:25 -04:00
aurel cordonnier
43fa62fcd8 Merge from Release-Engine-Test @ 16487383 to UE5/Main
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16488106 by aurel cordonnier in ue5-main branch]
2021-05-27 13:40:37 -04:00
jamie hayes
9389c3eb1e Add another optional separate translucency pass that gets composited after motion blur. Has no depth test (due to TAA color upsample with no upsampled depth), and is intended to work around reprojection and motion blur artifacts with translucency.
#rb zach.bethel, michal.valient
#jira none

[CL 16381727 by jamie hayes in ue5-main branch]
2021-05-19 02:09:02 -04:00
Wei Liu
462cab5257 Fix a bug of triple buffer of mobile eye adaptation.
#jira none

#rb Mi.Wang
#preflight 60a22f1913a1660001743797

[CL 16346768 by Wei Liu in ue5-main branch]
2021-05-17 05:39:52 -04:00
Luke Thatcher
bf64d7fbc7 Fix post processing using 1x1 dummy depth stencil texture causing RTV/DSV size mismatch and GPU crashes.
#rb Zach.Bethel
#jira UE-114411

[CL 16169944 by Luke Thatcher in ue5-main branch]
2021-04-30 13:02:00 -04:00
Guillaume Abadie
045cdbbaa6 Implements experimental r.TemporalAA.RejectSeparateTranslucency
#rb none

[CL 16143955 by Guillaume Abadie in ue5-main branch]
2021-04-28 10:59:10 -04:00
guillaume abadie
e8003c7a5a Renames Gen5TAA to Temporal Super Resolution
#rb graham.wihlidal
#jira UE-114288
#lockdown nick.whiting

#ROBOMERGE-OWNER: guillaume.abadie
#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 16116333 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)
#ROBOMERGE-CONFLICT from-shelf

[CL 16116611 by guillaume abadie in ue5-main branch]
2021-04-26 14:05:52 -04:00
Wei Liu
cc06d0ade9 Delete a duplicate code.
#jira none

#rb Mi.Wang

#fyi Florin.Pascu

[CL 16048916 by Wei Liu in ue5-main branch]
2021-04-19 04:48:04 -04:00
charles derousiers
783afee082 Add hair strands composition point after separate translucent pass.
#rb yuriy.odonnell
#jira UETOP-1125
#lockdown nick.whiting

#ROBOMERGE-SOURCE: CL 16011134 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)

[CL 16011330 by charles derousiers in ue5-main branch]
2021-04-14 16:04:46 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
florin pascu
0e7f38b405 Set Mobile FXAA to disabled when postprocessing is disabled
#jira UE-110113
#rb trivial
#preflight 606b2da8a595390001baeb4e

#ROBOMERGE-SOURCE: CL 15918953 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15921191 by florin pascu in ue5-main branch]
2021-04-05 15:04:53 -04:00
graham wihlidal
9948e93c6b Implemented a Nanite visualization overview, with a data-driven tile layout. This is similar to the gbuffer overview, except using a custom global shader instead of the post process material shader approach. Additionally, I managed to do this with just a single Nanite cull/raster pass. We already had a rasterizer permutation for retail vs. any visualization enabled, but it was a single ordinal mode. The rasterizer would do a 64b max and a 32b add. Was worried I needed arrays, multi-pass, strided output buffer, etc.. but then realized max is only used by raster mode, and add is only used by overdraw mode. I changed it all to a bitmask, run the rasterizer with that, and then multi-pass all the modes in screen space off the buffer.
Renamed Material Depth -> Material ID, and Hit Proxy Depth -> Hit Proxy ID

Moved Material ID into the Standard commands grouping, as it can be useful for content creators.

Made the editor hide all the Advanced commands by default, can make them available in the UX with r.Nanite.Visualize.Advanced now. Command line has full access to all of them, regardless of this setting.

Renamed r.Nanite.DebugSceneComposite to r.Nanite.Visualize.Composite, and changed the behavior for -1=default, 0=off, 1=on
Renamed r.Nanite.DebugSobelFilter to r.Nanite.Visualize.EdgeDetect and defaulted it on for content creator benefit.

Removed int4 VisualizeConfig member from Rasterizer UB, and added 32bit visualization mode mask instead.
Removed 32bit RasterStateReverseCull member from Rasterizer UB, and folded it into pre-existing 32bit RenderFlags

Renamed Nanite::FDebugVisualizeCS -> Nanite::FNaniteVisualizeCS
Renamed DebugVisualize.usf -> Visualize.usf

Made all visualizations composite against scene depth by default, except the overdraw mode.

Changed overdraw view mode to use ColorMapInferno from ColorMap.ush

#rb brian.karis
#fyi michal.valient, rune.stubbe

[CL 15828833 by graham wihlidal in ue5-main branch]
2021-03-25 15:02:12 -04:00
Daniel Wright
697b5b9cf6 Sparse, narrow band, streamed Mesh Signed Distance Fields
* SDFs are now generated, allocated from the atlas and uploaded in 8^3 bricks (7^3 unique data, half voxel padding).
 * Tracing must load the brick index from the indirection table, and only bricks near the surface are stored
 * 3 mips are now generated, with the lowest resolution always loaded and the other 2 streamed
 * SDFs are now G8 narrow band.  Lower resolution mips must be traversed when querying distance to nearest surface far away from the surface
 * The Distance Field Brick Atlas is now stored for each FScene and dynamically resized based on needs with a GPU memcopy
 * Brick atlas uses a 1d pooled allocator which has no fragmentation and greatly reduces packing waste over the 3d allocator
 * Added new indirection for Distance Field Asset data, so that only a single entry needs to be updated when a mip is streamed in or out in scenes with millions of instances
 * Compute shaders operating on distance field instances generate streaming requests, which are async read back to CPU, turned into IO requests, which are polled and when complete uploaded to atlases
 * Any mesh instance inside the Global SDF extent (200m) requests mip1, and at 50m requests mip2
 * Now using a batched compute scatter to upload to the distance field atlas instead of RHIUpdateTexture3d, to bypass alignment restrictions and per-upload overhead
 * Distance Field streaming uses an async task to move Memcpy and IO request overhead off of the Rendering Thread
 * Distance Field Visualization now computes a normal from the SDF gradient and does simple lighting to better visualize the scene representation
 * Increased r.DistanceFields.MaxPerMeshResolution from 128 to 512, to better represent large objects
 * Mesh SDF generation now uses an Embree point query to calculate closest unsigned distance, and then a much smaller set of rays to count backfaces for negative region determination, for a 11x speedup
 * Upgraded mesh utilities to Embree 3.12.2 to get point queries
 * Fixed wrong transform used for SDF normals in Lumen, causing non-uniformly scaled meshes to have incorrect Surface Cache interpolation
 * Fixed Static Mesh materials not getting PostLoaded before SDF build, causing their blend modes to be wrong for the build, which corrupts the DDC.  Also included those blend modes in the DDC key.

Original costs on 1080 GTX (full updates on everything and no screen traces)
10.60ms   UpdateGlobalDistanceField
3.62ms   LumenReflectiveTest.DirectionalLight_1 Shadowmap 1
1.73ms   VoxelizeCards Clipmaps=[0,1,2,3]
0.38ms   TraceCards 1 dispatch 1 groups
0.51ms   TraceCards 1 dispatch 1 groups

Sparse SDF costs
12.06ms   UpdateGlobalDistanceField
4.35ms   LumenReflectiveTest.DirectionalLight_1 Shadowmap 1
2.30ms   VoxelizeCards Clipmaps=[0,1,2,3]
0.69ms   TraceCards 1 dispatch 1 groups
0.77ms   TraceCards 1 dispatch 1 groups

Tested: TopazEntry PC, Reverb PC and PS5, EngineTests, QAGame, Rift, Frosty P_Construct_WP, FortGPUTestbed

#rb Krzysztof.Narkowicz

#ROBOMERGE-OWNER: Daniel.Wright
#ROBOMERGE-AUTHOR: daniel.wright
#ROBOMERGE-SOURCE: CL 15784493 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)
#ROBOMERGE-CONFLICT from-shelf

[CL 15790658 by Daniel Wright in ue5-main branch]
2021-03-23 22:40:05 -04:00
graham wihlidal
0ed0da2167 Move Nanite visualization into post processing pass creation to occur after tonemap and before shader print.
#rb brian.karis

[CL 15789949 by graham wihlidal in ue5-main branch]
2021-03-23 21:46:40 -04:00
dmitriy dyomin
8e508176a9 Fixed: auto-instancing on mobile
#ROBOMERGE-OWNER: dmitriy.dyomin
#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 15757659 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)
#ROBOMERGE-CONFLICT from-shelf

[CL 15772431 by dmitriy dyomin in ue5-main branch]
2021-03-22 22:21:46 -04:00
Marc Audy
8f73cd7fa9 Merge UE5/Release-Engine-Staging @ 15630841 to UE5/Main
This represents UE4/Main @ 15601601

[CL 15631170 by Marc Audy in ue5-main branch]
2021-03-05 19:27:14 -04:00
Guillaume Abadie
4bbf0cf5f0 Fixes ensure due to temporal upsampling when using ray tracing debugging view mode
#rb none

[CL 15624546 by Guillaume Abadie in ue5-main branch]
2021-03-05 11:23:39 -04:00
Wei Liu
c420f31b4b Add a console variable for setting mobile anti-aliasing method, remove the r.MobileMSAA and get the MSAA sample count from r.MSAACount.
#jira none

#rb Dmitriy.Dyomin, Jack.Porter, Mi.Wang

[CL 15514216 by Wei Liu in ue5-main branch]
2021-02-24 11:02:45 -04:00
Wei Liu
e1dbc67499 Support Desktop TAA with the mobile renderer( reimplement in UE5)
#jira none

#rb Dmitriy.Dyomin, Jack.Porter, Florin.Pascu, Mi.Wang

[CL 15466697 by Wei Liu in ue5-main branch]
2021-02-18 21:11:17 -04:00
Guillaume Abadie
30b9f0ba9b Automatically use r.SSS.Quality=1 recombine when using Gen5 TAA
#rb none

[CL 15364741 by Guillaume Abadie in ue5-main branch]
2021-02-09 06:30:16 -04:00