Commit Graph

161 Commits

Author SHA1 Message Date
Sebastien Hillaire
d28a031400 Strata - beginning of rough refraction of sub layers (with scene lighting split into untouched, sss and rough reffracted luminance)
- separate SSS, opaque rough refraction and scene color output when strata project setting is enabled.
- simple placeholder per pixel variance from roughness/layers computation
- SSS only reads from subsurface buffer when ORR is enabled
- Added simple combine pass to final scene lighting (no blur for now)
- Started adding tiling but reached UAV count limit. I will refactor code later to workaround that.
- Updated light rendering, reflection environment pixel shader. Next will be lumen and clustered deferred shading.

#preflight https://horde.devtools.epicgames.com/job/622fc09fe348fe2ada4214f8
#rb none
#fyi charles.derousiers, tiantian.xie

[CL 19382940 by Sebastien Hillaire in ue5-main branch]
2022-03-15 03:11:08 -04:00
Lukas Hermanns
c6ed66feff Enable CFLAG_ForceDXC for platforms that require DXC for HLSL2021.
#rb Guillaume.Abadie
#jira UE-138358
#preflight 622918411f1ec97d4e9741aa
#rnx

[CL 19325937 by Lukas Hermanns in ue5-main branch]
2022-03-09 16:26:11 -05:00
Andrew Davidson
4a3e582384 LWC: Remove UE_LARGE_WORLD_COORDINATES_DISABLED toggle
#rb stephen.holmes
[FYI] zak.middleton
#preflight 61f7d18b114ec25fe09648d6

#ROBOMERGE-OWNER: Andrew.Davidson
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18788533 in //UE5/Release-5.0/... via CL 18788583 via CL 18788850
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
#ROBOMERGE-CONFLICT from-shelf
#preflight 61f7eb7a114ec25fe0990f8c

[CL 18789644 by Andrew Davidson in ue5-main branch]
2022-01-31 10:10:51 -05:00
Charles deRousiers
90e7ad66a9 Add a IsStrataEnable function per module where it is used.
#rb none
#jira none
#fyi sebastien.hillaire
#preflight 61eebce65e0414e6ec1e40cb

[CL 18708521 by Charles deRousiers in ue5-main branch]
2022-01-24 10:02:04 -05:00
arciel rekman
0c74b967c3 Exclude editor-only shaders from games that don't support a cooked editor.
#rb Josh.Adams, Jason.Nadro
[REVIEW] [at]Josh.Adams, [at]Jason.Nadro
#jira none
#preflight none

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18647895 in //UE5/Release-5.0/... via CL 18649305 via CL 18649672
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18649956 by arciel rekman in ue5-main branch]
2022-01-18 17:45:43 -05:00
axel riffard
92a7004918 Harmonize Metal version to use in iOS / Mac
#jira UE-135971
#rb jack.porter
[FYI] will.damon, carl.lloyd
#preflight 61e51ef2a2616066f675dd5e

#ROBOMERGE-OWNER: axel.riffard
#ROBOMERGE-AUTHOR: axel.riffard
#ROBOMERGE-SOURCE: CL 18631139 in //UE5/Release-5.0/...
#ROBOMERGE-BOT: UE5 (Release-5.0 -> Release-Engine-Staging) (v899-18417669)
#ROBOMERGE-CONFLICT from-shelf
#p4v-cherrypick 18631594
#preflight 61e643cb1f30b67a22f3febd

[CL 18636647 by axel riffard in ue5-main branch]
2022-01-17 23:50:00 -05:00
arciel rekman
2a499437fe Change shader compression method to Oodle Selkie6 by default (UE-136845).
- Provides about 8% runtime memory savings (in local tests).
- Also, adds more compression types for shaders.
- Impact on the shader compilation (in SCWs) seems to be negligible in local tests.

#rb Devin.Doucette, Charles.Bloom
[REVIEW] [at]Devin.Doucette, [at]Charles.Bloom, [at]Jason.Nadro
#jira UE-136845

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18502862 via CL 18503105 via CL 18503112 via CL 18505939 via CL 18505950
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18505961 by arciel rekman in ue5-release-engine-test branch]
2022-01-04 00:58:30 -05:00
tuxerr
a531f1d4b4 PR #8679: regenerate UBO structs when platform changes (Contributed by tuxerr)
#rb Mihnea.Balta,Lukas.Hermanns
[FYI] Arciel.Rekman
#preflight 61a9017f800738dbfbbc4920

#ROBOMERGE-AUTHOR: jeannoe.morissette
#ROBOMERGE-SOURCE: CL 18408495 in //UE5/Release-5.0/... via CL 18408515
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18408530 by tuxerr in ue5-release-engine-test branch]
2021-12-08 13:31:51 -05:00
arciel rekman
f302f8f030 Fix CVars not being picked up from other sections (UE-135567).
- Some projects put rendering CVars in other sections than RendererSettings.

#jira UE-135567
[at]Josh.Adams, [at]Dmitriy.Dyomin
#rb Josh.Adams, Dmitriy.Dyomin

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18270117 in //UE5/Release-5.0/... via CL 18270123
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18270137 by arciel rekman in ue5-release-engine-test branch]
2021-11-23 10:17:56 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
carl lloyd
232f64154e Added support for full precision in Material expressions to project
Added override for half precision to Materials

#jira UE-130988
#rb Jack.Porter, Dmitriy.Dyomin
#p4v-cherrypick 17965223

#ROBOMERGE-AUTHOR: carl.lloyd
#ROBOMERGE-SOURCE: CL 18035100 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18035152 by carl lloyd in ue5-release-engine-test branch]
2021-11-03 11:57:39 -04:00
christopher waters
a43a3f735f More bring-up work on bindless in D3D12RHI and initial public RHI support:
- Bindless rendering is not enabled anywhere yet.
- Adding bSupportsBindless to DDSPI.
- Moving ED3D12DescriptorHeapType into RHI and renaming to ERHIDescriptorHeapType.
- Adding FRHIDescriptorHandle for public usage of bindless indices.
- Adding GetBindlessHandle() to RHI SamplerState, SRV, UAV.
- Adding GetDefaultShaderResourceView() to RHI Textures.
- Adding bindless Sampler heap support to D3D12.
- Cleaned up some common shader code in prep for future bindless work.

#jira none
#rb mihnea.balta
#preflight 6169f8fafeab330001591bd0

#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 17846249 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)

[CL 17846289 by christopher waters in ue5-release-engine-test branch]
2021-10-18 12:00:17 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
ben ingram
0bb0a923a0 Merging Dev-LWCRendering into Main, this includes initial work to support rendering with LWC-scale position
Basic approach is to add HLSL types FLWCScalar, FLWCMatrix, FLWCVector, etc.  Inside shaders, absolute world space position values should be represented as FLWCVector3.  Matrices that transform *into* absolute world space become FLWCMatrix.  Matrices that transform *from* world space become FLWCInverseMatrix.  Generally LWC values work by extending the regular 'float' value with an additional tile coordinate.  Final tile size will be a trade-off between scale/accuracy; I'm using 256k for now, but may need to be adjusted.  Value represented by a FLWCVector thus becomes V.Tile * TileSize + V.Offset.  Most operations can be performed directly on LWC values.  There are HLSL functions like LWCAdd, LWCSub, LWCMultiply, LWCDivide (operator overloading would be really nice here).  The goal is to stay with LWC values for as long as needed, then convert to regular float values when possible.  One thing that comes up a lot is working in translated (rather than absolute) world space.  WorldSpace + View.PrevPreViewTranslation = TranslatedWorldspace.  Except 'View.PrevPreViewTranslation' is now a FLWCVector3, and WorldSpace quantities should be as well.  So that becomes LWCAdd(WorldSpace, View.PrevPreViewTranslation) = TranslatedWorldspace.  Assuming that we're talking about a position that's "reasonably close" to the camera, it should be safe to convert the translated WS value to float.  The 'tile' coordinate of the 2 LWC values should cancel out when added together in this case.  I've done some work throughout the shader code to do this.  Materials are fully supporting LWC-values as well.  Projective texturing and vertex animation materials that I've tested work correctly even when positioned "far away" from the origin.

Lots of work remains to fully convert all of our shader code.  There's a function LWCHackToFloat(), which is a simple wrapper for LWCToFloat().  The idea of HackToFloat is to mark places that need further attention, where I'm simply converting absolute WS positions to float, to get shaders to compile.  Shaders converted in this way should continue to work for all existing content (without LWC-scale values), but they will break if positions get too large.

General overview of changed files:
LargeWorldCoordinates.ush - This defines the FLWC types and operations
GPUScene.cpp, SceneData.ush - Primitives add an extra 'float3' tile coordinate.  Instance data is unchanged, so instances need to stay within single-precision range of the primitive origin.  Could potentially split instances behind the scenes (I think) if we don't want this limitation
HLSLMaterialDerivativeAutogen.cpp, HLSLMaterialTranslator.cpp, Preshader.cpp - Translated materials to use LWC values
SceneView.cpp, SceneRelativeViewMatrices.cpp, ShaderCompiler.cpp, InstancedStereo.ush - View uniform buffer includes LWC values where appropriate
#jira UE-117101
#rb arne.schober, Michael.Galetzka

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 17787435 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)

[CL 17787478 by ben ingram in ue5-release-engine-test branch]
2021-10-12 13:31:00 -04:00
lukas hermanns
85dec65f90 Add bSupportsDxc to DataDrivenPlatformInfo.
#rb Arne.Schober, Rolando.Caloca
[FYI] Josh.Adams, Brian.White, Florin.Pascu
#jira none
#rnx

#ROBOMERGE-AUTHOR: lukas.hermanns
#ROBOMERGE-SOURCE: CL 17776856 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17776906 by lukas hermanns in ue5-release-engine-test branch]
2021-10-11 17:16:04 -04:00
aurel cordonnier
69fe095547 Merge from Release-Engine-Staging @ 17636544 to Release-Engine-Test
This represents UE4/Main @17638339 and Dev-PerfTest @17636504

[CL 17638842 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-27 19:54:25 -04:00
jeremy moore
daefcfead4 Make "r.vt.FeedbackFactor" something that can be changed at runtime, instead of needing a restart/shader recompile.
This should be useful if we want to vary the feedback trade offs for different modes.
Did some comparisons of shader ISA and ALU cost is unchanged.
#jira none
#ushell-cherrypick of 17483512 by Jeremy.Moore

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17491509 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17491521 by jeremy moore in ue5-release-engine-test branch]
2021-09-13 09:57:32 -04:00
florin pascu
6eaadba834 Read r.MobileNumDynamicPointLights from platform ini instead of project cvar
Add r.MobileNumDynamicPointLights to the shader keystring
#jira UE-125928
#rb Dmitriy.Dyomin, Jack.Porter
#preflight 6139e0f4f9a522000139e1bd
#ushell-cherrypick of 17470398 by Florin.Pascu

#ROBOMERGE-AUTHOR: florin.pascu
#ROBOMERGE-SOURCE: CL 17470936 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17470965 by florin pascu in ue5-release-engine-test branch]
2021-09-09 07:02:01 -04:00
carl lloyd
a0d85084b1 Added support for padding attribute locations automatically for OpenGLES
Fixed OpenGLES preview

#rb Lukas.Hermanns

#ROBOMERGE-AUTHOR: carl.lloyd
#ROBOMERGE-SOURCE: CL 17460403 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17460416 by carl lloyd in ue5-release-engine-test branch]
2021-09-08 13:00:48 -04:00
rolando caloca
17e13e521b UE5 - Remove some hlslcc vestiges from Vulkan
#rb Dmitriy.Dyomin, Lukas.Hermanns, jeannoe.morissette

#ROBOMERGE-SOURCE: CL 17369648 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17369655 by rolando caloca in ue5-release-engine-test branch]
2021-08-31 12:04:32 -04:00
christopher waters
9996d7091b Allowing r.Shaders.Optimize to be set per-platform.
#jira none
#rb arciel.rekman
#preflight 611d13819db7df00012bf70a

#ROBOMERGE-SOURCE: CL 17222081 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17222084 by christopher waters in ue5-release-engine-test branch]
2021-08-18 16:52:12 -04:00
christopher waters
1c21a5489c Shader symbol terminology changes
- Splitting symbol generation and shader "debug info" generation into two different cvars. This should now allow us to generate symbols post-packaging without generating different shader variants. This should also enable us to always generate symbols and still have the final deduplicated shader sizes.
- r.Shaders.Symbols is now the primary way to enable shader symbols for debugging.
- r.Shaders.GenerateSymbols can be enabled to always generate symbols without writing them to disk.
- r.Shaders.WriteSymbols can be used to force write symbols if they were previously generated.
- r.Shaders.ExtraData can be used to generate shader names for engine runtime systems to use.
- NotifyShaderCooked replaced with NotifyShaderCompiled, prep for upcoming non-cook symbol writing.
- PC DXC shader compiles should only generate debug info when requested, not all the time.
- PC FXC shader compiles should generate debug info when requested, not just when r.Shaders.Optimize is 0.

#jira none
#rb arciel.rekman, lukas.hermanns
#preflight 611ad9035e737200015992db

#ROBOMERGE-SOURCE: CL 17186155 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17186162 by christopher waters in ue5-release-engine-test branch]
2021-08-16 23:18:23 -04:00
yuriy odonnell
fa14d532ba Merging pull requests to improve rendering determinism through more stable draw sorting.
* Use a shader code hash instead of sorting by shader pointer in CalculateBasePassMeshStaticSortKey()
* Added a serial number to UPrimitiveComponent, which is generated in OnRegister() and then used in FPrimitiveArraySortKey as an extra sort key.

Contributed by andrewtop-cruise.

#github 7934
#github 8273
#preflight 61128303afd67e0001e7a14b
#rb Arciel.Rekman

#ROBOMERGE-SOURCE: CL 17150851 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17150861 by yuriy odonnell in ue5-release-engine-test branch]
2021-08-12 08:35:25 -04:00
graham wihlidal
5eea21442d Refactored mesh shader RHI abstraction into tiers, allowing various platforms to correctly check for optional features (like primitive attribute support)
[FYI] christopher.waters, luke.thatcher, eric.mcdaniel
#preflight 61143a4c9c7bb10001f06277

#ROBOMERGE-SOURCE: CL 17143667 via CL 17143685
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17143691 by graham wihlidal in ue5-release-engine-test branch]
2021-08-11 18:29:54 -04:00