VideoBackends: Enable depth clamping.

This commit is contained in:
Jules Blok
2016-08-03 21:54:22 +02:00
parent b1ed7e80fb
commit e9e81ece65
6 changed files with 7 additions and 21 deletions

View File

@ -725,6 +725,7 @@ Renderer::Renderer()
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glEnable(GL_CLIP_DISTANCE0);
glEnable(GL_DEPTH_CLAMP);
glPixelStorei(GL_UNPACK_ALIGNMENT, 4); // 4-byte pixel alignment
@ -1137,7 +1138,7 @@ void Renderer::SetViewport()
auto iceilf = [](float f) { return static_cast<GLint>(ceilf(f)); };
glViewport(iceilf(X), iceilf(Y), iceilf(Width), iceilf(Height));
}
glDepthRangef(0.0f, 1.0f);
glDepthRangef(0.0f, 16777215.0f / 16777216.0f);
}
void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaEnable, bool zEnable,