forked from ShuriZma/suyu
1
0
Fork 0

OpenGL: implement face flips according to NDC

This commit is contained in:
Liam 2022-05-06 20:04:56 -04:00
parent 18a0c2e9db
commit b317f54f22
1 changed files with 3 additions and 4 deletions

View File

@ -563,12 +563,11 @@ void RasterizerOpenGL::SyncViewport() {
flags[Dirty::FrontFace] = false; flags[Dirty::FrontFace] = false;
GLenum mode = MaxwellToGL::FrontFace(regs.front_face); GLenum mode = MaxwellToGL::FrontFace(regs.front_face);
bool flip_faces = false; bool flip_faces = true;
if (regs.screen_y_control.triangle_rast_flip != 0 && if (regs.screen_y_control.triangle_rast_flip != 0) {
regs.viewport_transform[0].scale_y < 0.0f) {
flip_faces = !flip_faces; flip_faces = !flip_faces;
} }
if (regs.viewport_transform[0].scale_z < 0.0f) { if (regs.viewport_transform[0].scale_y < 0.0f) {
flip_faces = !flip_faces; flip_faces = !flip_faces;
} }
if (flip_faces) { if (flip_faces) {