1. Unify the lighting calculation for both mobile deferred and forward.

2. Add an option to use high quality BRDF on mobile as the same with PC.
3. Fallback to default light shading model if it is not supported on mobile.
4. Use EnvBrdf for mobile deferred lighting pass.

#jira none

#rb Dmitriy.Dyomin
#preflight 60cdef32be81e8000118d85c

[CL 16722349 by Wei Liu in ue5-main branch]
This commit is contained in:
Wei Liu
2021-06-19 10:01:53 -04:00
parent f900de7109
commit 8208074bf6
12 changed files with 406 additions and 238 deletions
@@ -1560,6 +1560,11 @@ void ShaderMapAppendKeyString(EShaderPlatform Platform, FString& KeyString)
{
KeyString += IsMobileDistanceFieldEnabled(Platform) ? TEXT("_MobSDF") : TEXT("");
}
{
static IConsoleVariable* MobileEnableHighQualityBRDFCVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Mobile.EnableHighQualityBRDF"));
KeyString += (MobileEnableHighQualityBRDFCVar && MobileEnableHighQualityBRDFCVar->GetInt() != 0) ? TEXT("_HQBRDF") : TEXT("");
}
}
else
{