Files
UnrealEngineUWP/Engine/Source/Runtime/NetworkFileSystem
Jason Nadro 7e37e4cc2e Cooked platform ODSC. Only compile the shaders that are rendered with and not complete shader maps for every cooked material.
# Results
- In my small tests this resulted in compiling 8.9x less shaders (1558 vs. 174)
- Spent 107 seconds less compiling.

# Changes
- Adds CacheGivenTypesForCooking to UMaterialInterface and implemented for UMaterial and UMaterialInstance.  This is responsible for compiling just the given types of shaders which is fully qualified by VF Type, Shader Type (or Shader Pipeline Type).
- Fully qualify each shader compile request from the client by FeatureLevel and QualityLevel.  This way we don't compile multiple quality levels that aren't actively rendered with.
- CacheGivenTypesForCooking for UMaterial and UMaterialInterface explicity tries to re-use and find existing resources so we can progressively build up the shadermap while running.
- FMaterial::CacheGivenTypes now can compile shader pipelines.
- Adds CompileODSCMaterialsForRemoteRecompile which compiles just the requested shaders.  This was because I wanted to leave the functionality in CompileMaterialsForRemoteRecompile alone.
- FShaderRecompileData now has a serialize function so the Load/Save serialize code can be the same on host and client.
- Made CompileMaterialsForRemoteRecompile compiled only for the Editor.
- Don't assert on needing complete shader maps when using ODSC.
- Mass conversion from NULL to nullptr in ShaderCompiler.cpp
- Refactoring some common code from RecompileShadersForRemote into separate functions.

#rb Ben.Ingram
#jira UE-136438
#preflight 6261bb9afe26b98ad8479633

[CL 19863961 by Jason Nadro in ue5-main branch]
2022-04-22 09:11:18 -04:00
..