6 ms·
You have to clip against planes in 4D space (xyzw) before perspective divide (xyz /= w), not 3D (xyz). This simplified sample shows Sutherland-Hodgman with 4D
by nauful 4y ago
You have to clip against planes in 4D space (xyzw) before perspective divide (xyz /= w), not 3D (xyz).
This simplified sample shows Sutherland-Hodgman with 4D clipping:
https://web.archive.org/web/20040713023730/http://wwwx.cs.unc.edu:80/~sud/courses/236/a2/homoclip_sud.cpp https://web.archive.org/web/20040713023730/http://wwwx.cs.un...
The main difference is the intersect method finds the intersection of a 4D line segment against a 4D plane.