Skip to content

Commit

Permalink
fix: fix incorrect shader warning for VR
Browse files Browse the repository at this point in the history
closes #481
  • Loading branch information
alandtse committed Oct 6, 2024
1 parent 4bbd7d8 commit f293518
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ShaderCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1739,6 +1739,10 @@ namespace SIE
}

auto state = State::GetSingleton();
if (state->isVR && strcmp(shader.fxpFilename, "OBBOcclusionTesting") == 0)
// use vanilla shader
return nullptr;

if (!((ShaderCache::IsSupportedShader(shader) || state->IsDeveloperMode() && state->IsShaderEnabled(shader)) && state->enableVShaders)) {
return nullptr;
}
Expand Down Expand Up @@ -1774,6 +1778,10 @@ namespace SIE
uint32_t descriptor)
{
auto state = State::GetSingleton();
if (state->isVR && strcmp(shader.fxpFilename, "OBBOcclusionTesting") == 0)
// use vanilla shader
return nullptr;

if (!((ShaderCache::IsSupportedShader(shader) || state->IsDeveloperMode() && state->IsShaderEnabled(shader)) && state->enablePShaders)) {
return nullptr;
}
Expand Down

0 comments on commit f293518

Please sign in to comment.