OpenGL graphics fixes

This commit is contained in:
Henrik Rydgård committed 2022-08-27 19:37:28 +02:00
1 parent a74d2ec185
commit c80245af91
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ struct Draw2DUB {
const UniformBufferDesc draw2DUBDesc{ sizeof(Draw2DUB), {
{ "texSize", -1, 0, UniformType::FLOAT2, 0 },
{ "scaleFactor", -1, 1, UniformType::FLOAT1, 0 },
{ "scaleFactor", -1, 1, UniformType::FLOAT1, 8 },
} };
+2 -2
View File
@@ -259,7 +259,7 @@ void DrawEngineGLES::ApplyDrawState(int prim) {
if (stencilState.enabled) {
renderManager->SetStencilFunc(stencilState.enabled, compareOps[stencilState.testFunc], stencilState.testRef, stencilState.testMask);
renderManager->SetStencilOp(stencilState.writeMask, stencilOps[stencilState.sFail], stencilOps[stencilState.zFail], stencilOps[stencilState.zPass]);
} else {
// Nasty special case for Spongebob and similar where it tries to write zeros to alpha/stencil during
// depth-fail. We can't write to alpha then because the pixel is killed. However, we can invert the depth
// test and modify the alpha function...
@@ -276,7 +276,7 @@ void DrawEngineGLES::ApplyDrawState(int prim) {
// TODO: Need to set in a way that carries over to the next draw..
gstate_c.Dirty(DIRTY_BLEND_STATE);
}
} else {
renderManager->SetStencilDisabled();
}
}