62 Commits

Author SHA1 Message Date
steve robb
6d5b974842 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30735396 by steve robb in ue5-main branch]
2024-01-19 19:41:56 -05:00
dmytro ivanov
8287cf4cdb Option to force always compiling materials for mobile in material editor
#rb Jack.Porter

[CL 30660119 by dmytro ivanov in ue5-main branch]
2024-01-17 11:31:40 -05:00
jason nadro
9ad0f78cc2 Adding LWC statistics to the newer shader platform statistics window in the Material Editor.
- This is in preparation for removing the older material statistics window in the Material Editor.

todo: So much copy pasta.  It should be data driven and easy to add a new stat.

#rb wouter.dek
#tests [Editor][Win64] Opening materials in the material with platform stats open

[CL 30508891 by jason nadro in ue5-main branch]
2024-01-09 12:32:53 -05:00
jason nadro
8f2bb2acc3 Adding preshader statistic to the newer shader platform statistics window in the Material Editor.
- This is in preparation for removing the older material statistics window in the Material Editor.

todo: So much copy pasta.  It should be data driven and easy to add a new stat.

#rb jason.hoerner
#tests [Editor][Win64] Opening materials in the material with platform stats open

[CL 30429065 by jason nadro in ue5-main branch]
2023-12-21 11:47:27 -05:00
jason nadro
7f1092758a [Shaders][Material Editor] - Add generic, data driven key, value shader statistics.
- Shader stats are simply key (FName) and value (POD types) that are stored per-shader.
- A Shader Statistic is a variant that can take on the following POD types: bool, float, int32, uint32
- Currently don't support strings since those weren't as trivial to implement (needed conversion and special case code to support serializing these to the memory images required by shader maps)
- Adds another shader statistics row in the Material Editor that will show the platform specific stats.
- The platform statistics are turned into a comma and newline separated string that is displayed to the user.
- Bump the shader output worker version since I'm changing the output file format (to contain the stats).
- The shader compiler output stores the stats as a `TMap<FString, FShaderStatVariant>`.  Serializing across FNames between Shader Compiler Worker and the main process wasn't working (different name tables).
- When storing and serializing the stats to the shader map we convert them to FNames. (see `FShader::FShader()`)

#rb dan.elksnitis

[CL 30394059 by jason nadro in ue5-main branch]
2023-12-19 09:36:35 -05:00
marc audy
763a611985 Fix C4072 warnings
#rnx

[CL 29852844 by marc audy in ue5-main branch]
2023-11-20 17:26:53 -05:00
dmitriy dyomin
e947de61d9 Moved FReadOnlyCVARCache to RenderCore module
Cleaned up and made more rendering read-only cvars go through this cache
It now can cache platform specific cvars, in non-editor builds
#rb jack.porter

[CL 29681907 by dmitriy dyomin in ue5-main branch]
2023-11-13 09:13:11 -05:00
dmytro ivanov
9dba280cc1 Show material hierarchy in platform stats and warn if derived material instances fail to compile
#rb Jack.Porter

[CL 27909604 by dmytro ivanov in ue5-main branch]
2023-09-15 05:04:46 -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
florin pascu
38932a3bcb Mobile PostProcess locallight
#rb Dmitriy.Dyomin

[CL 26539203 by florin pascu in ue5-main branch]
2023-07-24 03:26:30 -04:00
florin pascu
3c766daad5 Mobile Light Prepass
Disabled by default now
#jira UE-187113
#rb Dmitriy.Dyomin, Benjamin.Rouveyrol
#preflight 647999280848b7126d8bd06e

[CL 25755386 by florin pascu in ue5-main branch]
2023-06-02 05:02:31 -04:00
graham wihlidal
9ca9010fd4 Fixes to make COTF recompile shaders work correctly for mesh and material shaders, and also fixed ODSC to properly compile material shader permutations.
#rb jason.nadro, arciel.rekman
#fyi brian.karis, rune.stubbe, jamie.hayes, kryzstof.narkowicz, daniel.wright, yuriy.odonnell
#preflight skip

[CL 24430265 by graham wihlidal in ue5-main branch]
2023-02-27 15:07:18 -05:00
Josie Yang
6c000d7627 Conditionally generate material platform stats for GPUSkinVertexFactory only when UsedWithSkeletalMesh, UsedWithMorphTarget, UsedWithCloth boxes are ticked.
It fixes GPUSkinVertexFactory throwing shader errors when material is not used with skeletal mesh

#rb Jeremy.Moore
#jira UE-173809
#preflight 63bf0553af3ebedd998a7a89

[CL 23662581 by Josie Yang in ue5-main branch]
2023-01-12 09:49:03 -05:00
christopher waters
6e30ddb01e Dependency cleanup around DataDrivenShaderPlatformInfo and a few other headers.
#preflight 63921e6a67018b14b5925197

[CL 23454104 by christopher waters in ue5-main branch]
2022-12-08 15:35:35 -05:00
jeremy moore
229b57dd77 Add material stats permutation for Runtime Virtual Texture output.
Useful for basic understanding of perf for landscape shaders that write RVT.
Mark material stats objects as Preview Materials. Without that we cull out any work gated by a layer weight when calculating stats.

[CL 22937906 by jeremy moore in ue5-main branch]
2022-11-02 23:06:33 -04:00
Dmitriy Dyomin
fb544c5bc8 Fxied: Missing material stats for mobile shaders
#jira none
#rb none
#preflight 62675e66820fbeb9a4d81c53

[CL 19915365 by Dmitriy Dyomin in ue5-main branch]
2022-04-25 23:13:55 -04:00
Wei Liu
04d7580d62 Clustered local lights and reflections are supported on mobile forward and deferred.
Local light shadows are supported on mobile forward and deferred, need to enable full depth prepass to generate the ShadowMaskTexture.

Remove the 4 maximum local lights limitation on mobile forward.

Remove the "High Quality Reflection" on mobile forward.

Disable simple lights on mobile forward.

#jira UE-149064

#rb Dmitriy.Dyomin

#preflight 625d17da772cf82d3a6059a6

[CL 19784597 by Wei Liu in ue5-main branch]
2022-04-18 09:09:40 -04:00
Jason Nadro
b914ef3c2f Only compile the shaders needed to gather shader platform stats in the Material Editor.
# Results
Modfiying WorldGridMaterial with two platforms open in platform stats.
- We compile a fixed number of shaders (less than 10 per platform) now instead of the 1078 shaders (per platform) w/ WorldGridMaterial.
- On average ProcessCompiledShaderMaps is 40x faster. (1727ms vs. 43ms)
- In the worst cast ProcessCompiledShaderMaps is 10.9x faster. (4865ms vs 445ms)
- The material editor in this scenario goes from unusable to useable.

# Changes
- Add `FMaterial::CacheGivenTypes` to compile just the shader types given to it.
- Call `GetRepresentativeShaderTypesAndDescriptions` to gather the shader types we care about and only submit jobs to compile those shaders when generating platform stats.
- Since we are no longer compile a complete shader map the ShaderCount is incorrect.  Now we call `GetShaderTypes` of the `FMaterialResource` to gather the number of shaders in the material.  This function doesn't trigger shader compilation which is important.
- Adding const to the following functions:
    - FMaterial::GetShaderTypesForLayout
    - FMaterial::GetShaderTypes
- FMaterial::GetShaderTypes is now ENGINE_API so we can call it from the Material Editor.
- Add `TBasePassPSFCachedVolumeIndirectLightingPolicy` shader type to FMaterialStatsUtils::GetRepresentativeShaderTypesAndDescriptions.  This shader has the worst case sampler count.  This ensures we compile this shader and are able to query the worst case sampler count for the platform stats.  This is very ad-hoc, and could be improved in the future.

#rb Ben.Ingram
#jira UE-138623
#preflight 623b4e4cc3399da9533282cc

[CL 19481265 by Jason Nadro in ue5-main branch]
2022-03-23 13:03:01 -04:00
dmitriy dyomin
de43655903 Fixed: Certain project configurations may result in missing material shader stats for ES31 feature level
Simplified shader name selection for mobile material shader stats
#rb jack.porter

#ROBOMERGE-OWNER: dmitriy.dyomin
#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 18632067 via CL 18632071 via CL 18632078 via CL 18632169 via CL 18632171 via CL 18651605 via CL 18651728 via CL 18651852
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18651910 by dmitriy dyomin in ue5-main branch]
2022-01-18 18:45:37 -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
dmitriy dyomin
883f6648c8 Mobile: fix a broken string formating for material stats
#jira UE-131469
#rb none

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 17975854 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17975863 by dmitriy dyomin in ue5-release-engine-test branch]
2021-10-29 05:45:24 -04:00
wei liu
a36d432240 Force mobile dynamic pointlight to use static branch.
#jira UE-131469

#rb Dmitriy.Dyomin

#p4v-preflight-copy 17870962

#ROBOMERGE-AUTHOR: wei.liu
#ROBOMERGE-SOURCE: CL 17883009 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17883020 by wei liu in ue5-release-engine-test branch]
2021-10-21 05:35:48 -04:00
aurel cordonnier
02c0f425e8 Copy up from Release-Engine-Staging @ 16738359
This represents UE4/Main @ 16738161 and Dev-PerfTest @ 16737719

[CL 16738582 by aurel cordonnier in ue5-release-engine-test branch]
2021-06-22 00:27:54 -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
will damon
0a4e702859 Remove all tessellation support from Metal RHI
- Also, remove _NOTESS Metal profile

#rb christopher.waters, richard.wallis, lukas.hermanns, rolando.caloca
#jira UE-94564
#rnx

[CL 15831929 by will damon in ue5-main branch]
2021-03-25 16:56:00 -04:00