Ubershaders: Support per-pixel lighting

This commit is contained in:
Stenzek 2017-07-27 20:52:20 +10:00
parent c8f31656cb
commit e968c191ff
12 changed files with 311 additions and 303 deletions
Source/Core/VideoCommon

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;
}