Ubershaders: Support per-pixel lighting

This commit is contained in:
Stenzek committed 2017-07-30 17:43:59 +10:00
1 parent c8f31656cb
commit e968c191ff
12 files changed
+311 -303

No files matched your search

+2 -9
View File
@@ -219,21 +219,14 @@ u32 VideoConfig::GetShaderPrecompilerThreads() const
return GetNumAutoShaderCompilerThreads();
}
bool VideoConfig::CanUseUberShaders() const
{
// Ubershaders are currently incompatible with per-pixel lighting.
return !bEnablePixelLighting;
}
bool VideoConfig::CanPrecompileUberShaders() const
{
// We don't want to precompile ubershaders if they're never going to be used.
return bPrecompileUberShaders && (bBackgroundShaderCompiling || bDisableSpecializedShaders) &&
CanUseUberShaders();
return bPrecompileUberShaders && (bBackgroundShaderCompiling || bDisableSpecializedShaders);
}
bool VideoConfig::CanBackgroundCompileShaders() const
{
// We require precompiled ubershaders to background compile shaders.
return bBackgroundShaderCompiling && bPrecompileUberShaders && CanUseUberShaders();
return bBackgroundShaderCompiling && bPrecompileUberShaders;
}