Commit Graph

248 Commits

Author SHA1 Message Date
sebastien hillaire
a75c7a6e10 Substrate - Added closure count limit for performance control.
Also added in editor UI for that.

#rb none
see also https://horde.devtools.epicgames.com/job/65004b61563726dac8c16b5c
[FYI] charles.derousiers

[CL 27830870 by sebastien hillaire in ue5-main branch]
2023-09-13 10:37:47 -04:00
sebastien hillaire
5ca4969d74 LFV - sampling on straightforward on translucent.
#rb none
#prelfight https://horde.devtools.epicgames.com/job/64f9c66e190d96dd29c652fa

[CL 27698199 by sebastien hillaire in ue5-main branch]
2023-09-07 20:36:59 -04:00
marc audy
65de35fdfb Lof elements that were not renamed yet.
- MSM_Substrate
- MCT_Substrate
- FStrataMaterialInput

#rb charles.derousiers

[CL 27563163 by marc audy in ue5-main branch]
2023-09-01 15:06:19 -04:00
tiago costa
62242df915 Moved IsStaticLightingAllowed() to RenderUtils.h and replaced relevant usage.
#rb ola.olsson

[CL 27557666 by tiago costa in ue5-main branch]
2023-09-01 12:07:26 -04:00
dan elksnitis
975ec4878a [shaders] mutate ddc key when enabling preprocessed job cache (so if unstripped shader code for symbols is desired, the cvar can be toggled off and new shaders compiled)
#rb Yuriy.ODonnell

[CL 27553498 by dan elksnitis in ue5-main branch]
2023-09-01 09:12:29 -04:00
graham wihlidal
2f29df1243 Shader root constants support (initially) for DX12 - shader bundles now have a very fast path that pushes record index and 3 arbitrary pass data parms into root constants without the need for a global uniform buffer.
#rb luke.thatcher, yuriy.odonnell
[FYI] brian.karis, rune.stubbe, zach.bethel, mihnea.balta

[CL 27369189 by graham wihlidal in ue5-main branch]
2023-08-25 02:18:58 -04:00
tom holmes
c03020e505 Better fix for UE-190842 generate new shaderversion guid and restore previous DDC logic
#rb dan.elksnitis
#jira UE-190842
#tests ran editor, cook lyra

[CL 26630815 by tom holmes in ue5-main branch]
2023-07-26 21:22:58 -04:00
tom holmes
c847704982 Mutate DDC string since platform symbol serialization data changed
Protect WriteSymbolData if the Filename is empty

#jira UE-190842
[REVIEW] [at]matt.peters
#tests cooking CitySample

[CL 26528753 by tom holmes in ue5-main branch]
2023-07-21 18:27:54 -04:00
tom holmes
ece26e8d8b Support for slim ShaderSymbols.info / r.Shaders.SymbolsInfo=1
Platforms can return a platform hash and a blob of text data to go with that hash
These are stored one / line in ShaderSymbols.info in lieu of full PDB info
Useful when full shader PDBs are impractically large, info-only is much smaller

#rb dan.elksnitis, john.huelin, serge.bernier
#tests test on cooking Lyra, various platforms, noddc and ddc

[CL 26496825 by tom holmes in ue5-main branch]
2023-07-20 16:51:51 -04:00
graham wihlidal
aa28eec58d Implemented shader compiler DDPI support for SupportsShaderBundleDispatch
[FYI] luke.thatcher, brian.karis, rune.stubbe

[CL 26401180 by graham wihlidal in ue5-main branch]
2023-07-16 13:59:45 -04:00
serge bernier
7bf7dd423c Fix global usage of all cvars related to shader pipelines:
r.ShaderPipelines
r.Material.ExcludeNonPipelinedShaders

Both cvars are currently disable on WindowsEngine.ini which make them also disable when we cook for consoles. ExcludeNonPipelinedShaderTypes is currently used only at cooking time when we compile shaders which is currently returning false, since the value is disabled on windows. Making those cvars use FShaderPlatformCachedIniValue, will allow to have specific platform value when cooking for a specific target. Moving r.Material.ExcludeNonPipelinedShaders to the defaultengine.ini file to keep it disable for the moment and not affecting shader key string. Will enable it progressively on console later.


r.Shaders.RemoveUnusedInterpolators

Make that cvar platform agnostic, since it will be used in on other consoles eventually. Platforms supporting the stripping of unused interpolators will check the same flag (CFLAG_ForceRemoveUnusedInterpolators) to enable it. Since windows can run opengl, and stripping is not supported on that shader platform, add extra logic to exclude the flag.

-Make the RHISupportsShaderPipelines function access a real DDPI attribute and not just test if we are not on mobile. Will need this to be able to have stripping unused shader interpolators on Switch.

[REVIEW] Laura.Hermanns

[CL 26018371 by serge bernier in ue5-main branch]
2023-06-15 13:27:44 -04:00
charles derousiers
d31253e301 Add Disney Sheen model for Substrate.
This sheen mode is enabled by default for platforms which high quality shading. The models degrades into a Charlie Sheen model for lower platform. This can also be controlled with r.Substrate.SheenQuality.

#rb none
[FYI] sebastien.hillaire, chris.kulla

[CL 25910338 by charles derousiers in ue5-main branch]
2023-06-10 02:09:12 -04:00
Sebastien Hillaire
302b839027 Substrate - added platofrm control for specular profile through r.Substrate.SpecularProfile.
#rb none
#preflight none
#fyi charles.derousiers

[CL 25601366 by Sebastien Hillaire in ue5-main branch]
2023-05-24 09:15:47 -04:00
dan elksnitis
f645f93588 [shaders] remove legacy preprocessor option & mcpp library
#rb Jason.Nadro
#preflight 6467bf0c2c0a5da0dcd7aaf2
#fyi Yuriy.ODonnell

[CL 25549427 by dan elksnitis in ue5-main branch]
2023-05-19 14:50:25 -04:00
Sebastien Hillaire
5cf6e3bb5b Strata - Glints prototype.
Contains aproved LICENCE and TPS for code and LUT.
Enabled via r.substrate.glint 1

#preflight https://horde.devtools.epicgames.com/job/645cd751aa3c584c0b384ea1
#rb charles.derousiers

[CL 25433839 by Sebastien Hillaire in ue5-main branch]
2023-05-11 15:33:23 -04:00
Laura Hermanns
b8c526c389 DXC and SPIRV-Cross fixes to enable Substrate in D3D11:
- Support structured buffers in HLSL backend of SPIRV-Cross (PR #2143).
- Integrate SPIRV-Cross fix to forward opaque types in GLSL backend (PR #2110).
- Integrate SPIRV-Cross fix to use actual field offset to validate vec4 boundary alignment (#PR 2139).
- Integrate SPIRV-Cross fix to not restrict SV_RenderTargetArrayIndex to GS and MS (#PR 2138).
- Make SV_Position decoration as implicitly invariant optional (Used to address Z-fighting issues in Vulkan and Metal; Drastically impacts vertex shader performance on certain platforms).
- Don't force DXC for all shaders when r.Substrate is enabled.

#jira UE-174555
#rb Sebastien.Hillaire, Carl.Lloyd, Dan.Elksnitis
#fyi Brian.White, Jason.Nadro, JeaNoe.Morissette, Yuriy.Odonnell, Guillaume.Abadie
#preflight 6453d3df0e33f2d51d2b032e

[CL 25353473 by Laura Hermanns in ue5-main branch]
2023-05-05 09:21:36 -04:00
florin pascu
11ed4ccf7a Add CFLAG_CullBeforeFetch and CFLAG_WarpCulling to control warp culling and CBF hardware optimizations
#rb Laura.Hermanns, Brian.White, Serge.Bernier
#preflight 6446fc3e641e2c3cb4db18d3

[CL 25177654 by florin pascu in ue5-main branch]
2023-04-25 06:01:45 -04:00
Charles deRousiers
2dd761fc54 Change Subsutrate sRGB encoding.
* Default now uses accurate sRGB value encoding.
* Lower platforms using lower shading quality (i.e., r.Substrate.ShadingQuality > 1), will continue to use the cheap sqrt/square encoding/decoding

Using proper sRGB encoding increases occupangy by 8 vgpr on ps4 and a fullscreen quad during the base pass by 0.2ms due to lower occupancy. So keep it disabled on lower platforms.

#rb none
#jira none
#preflight 642ad0058f078cc7031c1ae2
#fyi sebastien.hillaire

[CL 24891794 by Charles deRousiers in ue5-main branch]
2023-04-03 09:35:50 -04:00
Wei Liu
01a415b564 Sampling SceneDepth instead of fetching SceneDepthAux when full depth prepass is enabled.
#jira none

#rb Dmitriy.Dyomin
#preflight 64267ed89621ba9cb48c0edf

[CL 24868190 by Wei Liu in ue5-main branch]
2023-03-31 03:12:41 -04:00
dan elksnitis
49d7985a85 [shaders] Add "compile argument" functionality for generic parameters consumed by compile backends, along with helper to set both a compile arg AND define for cases which require both. The purpose of this is to move towards enforcing that preprocessor defines should _only_ be used during the preprocessing phase itself; the subset of defines that are currently used only as arguments to the compile backends (or used as both actual preprocessor defines and backend arguments) should use this mechanism instead. This allows us to explicitly identify and hash such parameters to be included in a stable key based primarily on a hash of preprocessed/deadstripped source; without it we would need to hash all defines which will defeat most of the deduplication benefit of doing this. A subsequent change will deprecate the GetDefinitions function on the shader compilation environment to enforce that defines cannot be read by anything outside of core shader system functionality.
#rb Massimo.Tristano
#rb Laura.Hermanns
#preflight 64258c2e5e52099fe3d03625

[CL 24854110 by dan elksnitis in ue5-main branch]
2023-03-30 10:47:09 -04:00
Sebastien Hillaire
88900c95e5 Compilation error fix for 24853509
#rb none
#preflight none

[CL 24853689 by Sebastien Hillaire in ue5-main branch]
2023-03-30 10:16:51 -04:00
Sebastien Hillaire
7e4d413b5f Substrate - always precompile with DXC when substrate is enabled and if DXC is supported. No need for any ForceDXC cvar anymore.
#rb Laura.hermanns
#preflight https://horde.devtools.epicgames.com/job/64253dafe11ce5214fec8ddd
#fyi charles.derousiers

[CL 24853509 by Sebastien Hillaire in ue5-main branch]
2023-03-30 10:01:27 -04:00
Sebastien Hillaire
de532bf488 Substrate - GPULightmass support
#rb none
#preflight https://horde.devtools.epicgames.com/job/64241210e11ce5214f740ebd
#fyi charles.derousiers

[CL 24833842 by Sebastien Hillaire in ue5-main branch]
2023-03-29 07:24:23 -04:00
Sebastien Hillaire
1491943760 Substrata - ray tracing material shaders uses fully simplified material for smaller payload.
Next would be to have the fully simplified mode disable anisotropy to have an even lower payload size.

#rb charles.derousiers
#preflight https://horde.devtools.epicgames.com/job/6422ad44973e609670e855c8

[CL 24815921 by Sebastien Hillaire in ue5-main branch]
2023-03-28 05:25:01 -04:00
Dmitriy Dyomin
1221e5705d Added support for ASTC Luminace+Alpha encoded normal maps
#jira none
#preflight 6404782e1d304a5471847436

[CL 24518576 by Dmitriy Dyomin in ue5-main branch]
2023-03-05 21:08:09 -05:00