mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Correct vertex Z calculation in GraphicsDrawer::_drawThickLine
Note: viewport transformation of Z coordinate performed in fragment shader. Fixed #2237 Mario Artist - Polygon Studio: line3D bug (HLE)
This commit is contained in:
parent
1b36d5740b
commit
80b219effa
|
@ -946,13 +946,13 @@ void GraphicsDrawer::_drawThickLine(int _v0, int _v1, float _width)
|
||||||
pVtx[0] = triangles.vertices[_v0];
|
pVtx[0] = triangles.vertices[_v0];
|
||||||
pVtx[0].x = pVtx[0].x / pVtx[0].w * gSP.viewport.vscale[0] + gSP.viewport.vtrans[0];
|
pVtx[0].x = pVtx[0].x / pVtx[0].w * gSP.viewport.vscale[0] + gSP.viewport.vtrans[0];
|
||||||
pVtx[0].y = ySign * pVtx[0].y / pVtx[0].w * gSP.viewport.vscale[1] + gSP.viewport.vtrans[1];
|
pVtx[0].y = ySign * pVtx[0].y / pVtx[0].w * gSP.viewport.vscale[1] + gSP.viewport.vtrans[1];
|
||||||
pVtx[0].z = pVtx[0].z / pVtx[0].w * gSP.viewport.vscale[2] + gSP.viewport.vtrans[2];
|
pVtx[0].z = pVtx[0].z / pVtx[0].w;
|
||||||
pVtx[1] = pVtx[0];
|
pVtx[1] = pVtx[0];
|
||||||
|
|
||||||
pVtx[2] = triangles.vertices[_v1];
|
pVtx[2] = triangles.vertices[_v1];
|
||||||
pVtx[2].x = pVtx[2].x / pVtx[2].w * gSP.viewport.vscale[0] + gSP.viewport.vtrans[0];
|
pVtx[2].x = pVtx[2].x / pVtx[2].w * gSP.viewport.vscale[0] + gSP.viewport.vtrans[0];
|
||||||
pVtx[2].y = ySign * pVtx[2].y / pVtx[2].w * gSP.viewport.vscale[1] + gSP.viewport.vtrans[1];
|
pVtx[2].y = ySign * pVtx[2].y / pVtx[2].w * gSP.viewport.vscale[1] + gSP.viewport.vtrans[1];
|
||||||
pVtx[2].z = pVtx[2].z / pVtx[2].w * gSP.viewport.vscale[2] + gSP.viewport.vtrans[2];
|
pVtx[2].z = pVtx[2].z / pVtx[2].w;
|
||||||
pVtx[3] = pVtx[2];
|
pVtx[3] = pVtx[2];
|
||||||
|
|
||||||
if (fabs(pVtx[0].y - pVtx[2].y) < 0.0001) {
|
if (fabs(pVtx[0].y - pVtx[2].y) < 0.0001) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user