This allows the following pattern when there are multiple shader entrypoints in a single file:
#ifdef MyEntryPointName
void MyEntryPointName(...)
{
}
#endif
This makes it possible to completely hide code and variables that are specific to one shader type from the others, while keeping the convenience of having multiple shader definitions in a single .usf file. This pattern is completely opt-in and therefore does not disrupt any previous idioms, though it does mean some code could be simplified going forward.
Use this pattern to fix warnings from the new DXC compiler in lumen and distance field shaders stemming from a THREADGROUP_SIZE being re-used on an unused entrypoint and creating invalid dimensions. This warnings only occurs when the shader minifier is enabled, but with this new approach, the redundant code is stripped out before the minifier runs, which leads to more savings overall.
#rb graham.wihlidal, Krzysztof.Narkowicz
[CL 32654032 by chris kulla in ue5-main branch]
* This change updates the legacy NTSC luminance factors to working color space accurate ones. By default, those now match the sRGB/Rec.709 definition.
* Legacy factors still accessible by enabling a new renderer project setting: "r.LegacyLuminanceFactors".
#jira UE-201221
#rb chris.kulla, Krzysztof.Narkowicz, Sebastien.Hillaire
[CL 32327656 by eric renaudhoude in ue5-main branch]
EShaderPermutationPrecacheRequest is returned to define if a permutation is required, not required or development only. Only required PSOs are precached.
DevelopmentOnly should be used for debug permutations and won't trigger an ensure when permutation is used at runtime which isn't requested for precaching.
Validation also runs in editor builds.
#rb christopher.waters
[CL 32297715 by kenzo terelst in ue5-main branch]
#fyi bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL30976715
#fyi Luke.Thatcher
Original CL Desc
-----------------------------------------------------------------
Remove "r.RecompileRenderer", STORE_ONLY_ACTIVE_SHADERMAPS, and all associated dead code paths that are no longer used.
- r.RecompileRenderer has been broken since at least August 2019 when CL 8231930 disabled the implementation of BackupGlobalShaderMap etc
- STORE_ONLY_ACTIVE_SHADERMAPS was disabled in 14363137 (September 2020) to resolve FORT-312158 (enabling the new loader). Fortnite was the only user of this code path.
- This is a delete-only change.
#jira UE-167133
#rb Arciel.Rekman, Jason.Nadro
[CL 30987478 by bob tellez in ue5-main branch]
#fyi Luke.Thatcher
Original CL Desc
-----------------------------------------------------------------
Remove "r.RecompileRenderer", STORE_ONLY_ACTIVE_SHADERMAPS, and all associated dead code paths that are no longer used.
- r.RecompileRenderer has been broken since at least August 2019 when CL 8231930 disabled the implementation of BackupGlobalShaderMap etc
- STORE_ONLY_ACTIVE_SHADERMAPS was disabled in 14363137 (September 2020) to resolve FORT-312158 (enabling the new loader). Fortnite was the only user of this code path.
- This is a delete-only change.
#jira UE-167133
#rb Arciel.Rekman, Jason.Nadro
[CL 30979008 by bob tellez in ue5-main branch]
- r.RecompileRenderer has been broken since at least August 2019 when CL 8231930 disabled the implementation of BackupGlobalShaderMap etc
- STORE_ONLY_ACTIVE_SHADERMAPS was disabled in 14363137 (September 2020) to resolve FORT-312158 (enabling the new loader). Fortnite was the only user of this code path.
- This is a delete-only change.
#jira UE-167133
#rb Arciel.Rekman, Jason.Nadro
[CL 30976715 by Luke Thatcher 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]