Remove snapping clipped points to the frustum plane.
Change-Id: Iad768d095695dd8b6130a745e6741b7029fa9649
Reviewed-on: https://swiftshader-review.googlesource.com/5424
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Renderer/Clipper.cpp b/src/Renderer/Clipper.cpp
index 1c17402..cfd859f 100644
--- a/src/Renderer/Clipper.cpp
+++ b/src/Renderer/Clipper.cpp
@@ -101,7 +101,6 @@
if(dj < 0)
{
clipEdge(polygon.B[polygon.b], *V[i], *V[j], di, dj);
- polygon.B[polygon.b].z = n * polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -110,7 +109,6 @@
if(dj > 0)
{
clipEdge(polygon.B[polygon.b], *V[j], *V[i], dj, di);
- polygon.B[polygon.b].z = n * polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -141,7 +139,6 @@
if(dj < 0)
{
clipEdge(polygon.B[polygon.b], *V[i], *V[j], di, dj);
- polygon.B[polygon.b].z = polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -150,7 +147,6 @@
if(dj > 0)
{
clipEdge(polygon.B[polygon.b], *V[j], *V[i], dj, di);
- polygon.B[polygon.b].z = polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -181,7 +177,6 @@
if(dj < 0)
{
clipEdge(polygon.B[polygon.b], *V[i], *V[j], di, dj);
- // polygon.B[polygon.b].x = -polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -190,7 +185,6 @@
if(dj > 0)
{
clipEdge(polygon.B[polygon.b], *V[j], *V[i], dj, di);
- // polygon.B[polygon.b].x = -polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -221,7 +215,6 @@
if(dj < 0)
{
clipEdge(polygon.B[polygon.b], *V[i], *V[j], di, dj);
- // polygon.B[polygon.b].x = polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -230,7 +223,6 @@
if(dj > 0)
{
clipEdge(polygon.B[polygon.b], *V[j], *V[i], dj, di);
- // polygon.B[polygon.b].x = polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -261,7 +253,6 @@
if(dj < 0)
{
clipEdge(polygon.B[polygon.b], *V[i], *V[j], di, dj);
- // polygon.B[polygon.b].y = polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -270,7 +261,6 @@
if(dj > 0)
{
clipEdge(polygon.B[polygon.b], *V[j], *V[i], dj, di);
- // polygon.B[polygon.b].y = polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -301,7 +291,6 @@
if(dj < 0)
{
clipEdge(polygon.B[polygon.b], *V[i], *V[j], di, dj);
- // polygon.B[polygon.b].y = -polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}
@@ -310,7 +299,6 @@
if(dj > 0)
{
clipEdge(polygon.B[polygon.b], *V[j], *V[i], dj, di);
- // polygon.B[polygon.b].y = -polygon.B[polygon.b].w;
T[t++] = &polygon.B[polygon.b++];
}
}