Skip to content

Commit 7a247ff

Browse files
authored
Fix swScissor() Y-axis clipping inversion in software renderer (#5976)
1 parent 5de8c35 commit 7a247ff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/external/rlsw.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4307,8 +4307,8 @@ void swScissor(int x, int y, int width, int height)
43074307

43084308
RLSW.scClipMin[0] = (2.0f*(float)RLSW.scMin[0]/(float)RLSW.vpSize[0]) - 1.0f;
43094309
RLSW.scClipMax[0] = (2.0f*(float)RLSW.scMax[0]/(float)RLSW.vpSize[0]) - 1.0f;
4310-
RLSW.scClipMax[1] = 1.0f - (2.0f*(float)RLSW.scMin[1]/(float)RLSW.vpSize[1]);
4311-
RLSW.scClipMin[1] = 1.0f - (2.0f*(float)RLSW.scMax[1]/(float)RLSW.vpSize[1]);
4310+
RLSW.scClipMin[1] = (2.0f*(float)RLSW.scMin[1]/(float)RLSW.vpSize[1]) - 1.0f;
4311+
RLSW.scClipMax[1] = (2.0f*(float)RLSW.scMax[1]/(float)RLSW.vpSize[1]) - 1.0f;
43124312
}
43134313

43144314
void swClearColor(float r, float g, float b, float a)

0 commit comments

Comments
 (0)