Commit Graph

78 Commits

Author SHA1 Message Date
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
marc audy
38909715d4 - Add BasePass permutations for GBL_ForceVelocity for Nanite materials that have WPO connected.
- Fix bad assumption that a material that has WPO connected will always have WPO enabled at run time, as it can be disabled during HLSL translation.
- Clean-up and de-duplicate some setup code common to both BasePassCS and BasePassPS

NOTE: This unfortunately can cause us to compile more Nanite base pass shaders than will be used until we are able to perform better dead code elimination of expressions when caching expression data.

#rb graham.wihlidal
#jira UE-167472
#rnx
#preflight 63530a4cf92c32502439caad

[CL 22712311 by marc audy in ue5-main branch]
2022-10-22 15:51:16 -04:00
mihnea balta
14344b093f Fix crash when enabling the shader complexity view mode.
The debug view mode shaders weren't binding the instanced view UB.

#jira UE-166728
#rnx
#preflight https://horde.devtools.epicgames.com/job/6345a95cf93be0f6340d4f03
#lockdown Mihnea.Balta
#rb Chris.Waters

[CL 22463654 by mihnea balta in ue5-main branch]
2022-10-11 15:44:09 -04:00
kenzo terelst
ee56085de5 - ComputeMeshFillMode doesn't require MeshBatch as parameter
- MeshPassProcessor create function takes feature level as create parameter
- MeshPassProcessor base stores the processor enum type (handy for reference and stat tracking per pass type)
 When pass enum value is not available then EMeshPassType::Num is used for now

#jira UE-139584
#rb Jason.Nadro, Mihnea.Balta, Zach.Bethel, Arciel.Rekman
#preflight 631b30f1304480f8f89fca35

[CL 21987972 by kenzo terelst in ue5-main branch]
2022-09-13 14:04:12 -04:00
bryan sefcik
07894f4a07 Removed redundant private include paths from build.cs files.
Fixed include paths to be relative to the private or public folders.
Hid or removed includes that reached into other private module folders.
Updated PublicInclude paths when necessary.

#jira
#preflight 631a717cec45fbf3d74d4ba7

[CL 21916033 by bryan sefcik in ue5-main branch]
2022-09-09 00:53:22 -04:00
benjamin rouveyrol
b5431f4463 rely on shader platform instead of rhi feature level when generating shaders: this can be an issue of one starts to cook a shader platform with a feature level not supported by the host
#jira UE-161918
#rb Jason.Nadro Jeremy.Moore mihnea.balta
#preflight 6308d3f51615ec0db54d2432

[CL 21589756 by benjamin rouveyrol in ue5-main branch]
2022-08-26 10:26:01 -04:00
graham wihlidal
523081e351 Removed compilation (of never used!) legacy simple forward shading permutations from Windows shader databases (~27% reduction of SM6, ~22% reduction of SM5 when simple forward was enabled in the compiler)
#rb brian.karis, daniel.wright, sebastien.hillaire, charles.derousiers
[FYI] michal.valient, jason.nadro, zousar.shaker
#preflight 62c7654aa6654f9729ea9cc0

#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 21010489 via CL 21010513 via CL 21010531
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21023729 by graham wihlidal in ue5-main branch]
2022-07-09 14:02:06 -04:00
zach bethel
34623f0321 Replaced thread-local MemStack with ConcurrentLinearAllocator across the renderer.
- Removed scene render mem-mark among others. MemStack usage is now restricted to local scopes with known marks.
 - Render resources with destructors are allocated using the FSceneRenderingBulkObjectAllocator on FSceneRenderer, which is deleted when the scene render is.

#preflight 62b266e20d4d6228de97babe
#rb mihnea.balta, yuriy.odonnell

[CL 20907647 by zach bethel in ue5-main branch]
2022-06-30 19:55:24 -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
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