- 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]
- 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]
- 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]
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]
Disabled by default now
#jira UE-187113
#rb Dmitriy.Dyomin, Benjamin.Rouveyrol
#preflight 647999280848b7126d8bd06e
[CL 25755386 by florin pascu in ue5-main branch]
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]
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]
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]
# 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]
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]