Commit Graph

70 Commits

Author SHA1 Message Date
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
Arciel Rekman
58a40d84f1 Fix crash when building HLOD in a commandlet.
- Remove shadermap access that can pose threading hazards.

#rb Ben.Ingram, Jason.Nadro
#jira none
#preflight
#review @Jason.Nadro, @Ben.Ingram

[CL 19855454 by Arciel Rekman in ue5-main branch]
2022-04-21 16:37:59 -04:00
Jason Nadro
e377452cf2 Prevent shifts by a negative value.
- Addresses static analysis warning: warning V610: Undefined behavior. Check the shift operator '<<'. The right operand is negative ('....' = [-1..254])
- Texture Resolution will be 1.

#rb Jeremy.Moore
#jira UE-147669
#preflight none

[CL 19587584 by Jason Nadro in ue5-main branch]
2022-04-01 09:44:47 -04:00
Josie Yang
f8cc29c587 Implement GPUSkinCache debug visualization modes
*) 'Overview' shows skin cache on/off, recompute tangents on/off
*) 'Memory' shows skin cache memory consumption per sk mesh, includes RT if sk mesh uses a separate RT entry
*)  'RayTracingLODOffset` shows RT LOD index offset from raster LOD index

#jira UE-136542
#rb jeremy.moore
#preflight 622bb12b902b7ca699df8755

[CL 19383862 by Josie Yang in ue5-main branch]
2022-03-15 06:49:12 -04:00
jeremy moore
de48f41044 Removed redundant value that was being used to distinguish debug modes.
In the new uber shader setup we can just use VisualizeMode for that.
#rb jason.nadro

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 18425502 in //UE5/Release-5.0/... via CL 18425520
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18425528 by jeremy moore in ue5-release-engine-test branch]
2021-12-09 16:57:09 -05:00
jason nadro
72a7310a2c [ShaderReduction] - Remove 7,688 shaders needed in the editor by combining separate debug viewmode shaders into a single ubershader controlled dynamically. Debug shaders are now only ~7% of the shaders in EngineTest instead of 15% of all shaders.
- Stats were run on EngineTest and results will vary from project to project.
- Removes FComplexityAccumulatePS, FLODColorationPS, FRequiredTextureResolutionPS, FMeshTexCoordSizeAccuracyPS, FPrimitiveDistanceAccuracyPS, FMaterialTexCoordScalePS
- All shader code is now contained in DebugViewmodePixelShader.usf.  Individual visualizations are contained within separate functions.
- All the C++ interface code has now been folded into a single implementation.
- Previously each implementation kept track of its name, and whether it needed local VF, if it needed material properties and needing instruction count.  Since every implementation is in the same shader we need all those features.  To simplify the code all this has been removed.
- We only keep track of a single FDebugViewModeInterface singleton to use for all debug modes.

#rb Graham.Wihlidal
#jira none
#preflight 61ae6bec1d6f74f2d4577fed

#ROBOMERGE-AUTHOR: jason.nadro
#ROBOMERGE-SOURCE: CL 18394421 in //UE5/Release-5.0/... via CL 18394431
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18394434 by jason nadro in ue5-release-engine-test branch]
2021-12-07 09:06:22 -05:00
jon nabozny
5342ad925e Added VirtualTexturePendingMips debug view mode.
For each pixel it shows the worst case missing mip level in all of the virtual textures sampled at that pixel.
Useful to analyze where late virtual texture page streaming is happening.
#rb ben.ingram
#preflight 615b5ecb255462000117288c
#lockdown michal.valient

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17716764 via CL 17979410 via CL 18366649 via CL 18366731
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18366789 by jon nabozny in ue5-release-engine-test branch]
2021-12-03 02:44:01 -05:00
sebastien hillaire
438491ff67 Removed the SkyAtmosphere base pass permutation as this is only controlled from the project setting and material state defines anyway.
This was missed when removing the AtmosphericFog.

#rb Arciel.Rekman, Jian.Ru
#jira FORT-411963

#ROBOMERGE-OWNER: sebastien.hillaire
#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 17964483 in //UE5/Release-5.0/... via CL 17964598
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17964608 by sebastien hillaire in ue5-release-engine-test branch]
2021-10-28 12:34:50 -04:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
aurel cordonnier
25a11deeac Merge from Release-Engine-Staging @ 16579919
This represents UE4/Main @ 16579691 and Dev-PerfTest @ 16579576

[CL 16581170 by aurel cordonnier in ue5-release-engine-test branch]
2021-06-07 20:09:45 -04:00
christopher waters
c45f1dfad5 Removing Tessellation:
- Removed Tessellation settings from Materials and Material Interfaces
- Removed Adjacency buffers from Static and Skeletal Meshes.

#jira UE-94564
#rb jeremy.moore, josie.yang, kevin.ortegren, yuriy.odonnell

#ROBOMERGE-OWNER: christopher.waters
#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 15501023 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
#ROBOMERGE-CONFLICT from-shelf

[CL 15502653 by christopher waters in ue5-main branch]
2021-02-23 14:03:21 -04:00
graham wihlidal
61244769d1 Decoupled more of the GPU scene instance culling work
==
* Added instance offset and count to primitive data, along with GetPrimitiveUniformShaderParameters() diffs
* Remaining FInstanceCullingManager& hooks through functions
* Various todo comments to address later
* Calls to (disabled for now) BuildRenderCommands()
* Mutability of FViewInfo in some spots
* Additional instance culling draw params in a few places
* EVertexInputStreamType cleanup
* UseVirtualShadowMaps() feature capability helper function

#authors ola.olsson, graham.wihlidal
#rb graham.wihlidal
#fyi brian.karis, rune.stubbe

[CL 15092149 by graham wihlidal in ue5-main branch]
2021-01-14 15:46:32 -04:00
graham wihlidal
862e861803 Added instance culling manager and context (disabled, and without shader files), and tons of hooks all over the renderer in preparation for upcoming GPU culling work.
#author ola.olsson
#rb graham.wihlidal
#fyi brian.karis, rune.stubbe

[CL 15082481 by graham wihlidal in ue5-main branch]
2021-01-14 05:23:34 -04:00
zach bethel
c6cb1e82be Deprecated and gutted FSceneRenderTargets. Moved all textures over to FSceneTextures. Refactored the renderer to use RDG textures from FSceneTextures instead.
#rb arne.schober, luke.thatcher, christopher.waters, kenzo.terelst

[CL 15040082 by zach bethel in ue5-main branch]
2021-01-11 14:49:16 -04:00
zach bethel
056a26cddd Refactored uniform buffers to use static bindings as opposed to FPersistentUniformBuffers across the deferred renderer. This removes the view uniform buffer and reflection capture uniform buffers from mesh draw commands and reduces the use of RHIUpdateUniformBuffers.
- View / InstancedView uniform buffers are now bound through RDG directly from the FViewInfo, or created on-demand for cases like jitter-free custom depth.
 - Removed most of the custom persistent view uniform buffers. Left one in Lumen to be done in a later CL.
 - ReflectionCapture uniform buffer is now bound at the RDG pass level.

#rb christopher.waters

[CL 14873982 by zach bethel in ue5-main branch]
2020-12-07 17:43:21 -04:00
zach bethel
07521a81f9 Fix for debug view mode build break.
#rb none
#rnx

[CL 14679204 by zach bethel in ue5-main branch]
2020-11-06 14:49:35 -04:00
zach bethel
ae971f3207 Refactored some functions out of scene renderer and into free functions.
#rb sebastien.hillaire
#rnx

[CL 14677263 by zach bethel in ue5-main branch]
2020-11-06 11:50:06 -04:00
zach bethel
2103b268d4 Clean up of base pass uniform buffers to only include RDG versions.
#rb christopher.waters
#rnx

[CL 14636107 by zach bethel in ue5-main branch]
2020-11-02 16:51:34 -04:00
zach bethel
e4f467569d Removed scene render target context snapshot system.
#rb arne.schober

[CL 14615156 by zach bethel in ue5-main branch]
2020-10-29 16:32:16 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
zach bethel
05d33be488 Removal of the deprecated rendering composition graph from the engine.
#rb christopher.waters
#fyi charles.derousiers, steve.smith
#jira none

[CL 14523947 by zach bethel in ue5-main branch]
2020-10-20 11:36:46 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Michal Valient
95d19f95b1 [REVERB] Merging //UE4/Private-Reverb-Development@13832732
#rb graham.wihlidal, rune.stubbe, brian.karis, andrew.lauritzen, jeff.farris

[CL 13834854 by Michal Valient in ue5-main branch]
2020-07-06 18:58:26 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
uriel doyon
46f0d86dcf Converted the LODColoration viewmode to use the debug view mode framework.
This fixes tessellation, vertex displacement and to some extent translucency rendering.
#rb rolando.caloca
#jira UE-85311
#lockdown marcus.wassmer

#ROBOMERGE-SOURCE: CL 12874781 in //UE4/Release-4.25/... via CL 12874784 via CL 12874786
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v681-12776863)

[CL 12874788 by uriel doyon in Main branch]
2020-04-16 18:30:27 -04:00