News for hackers. Stuff that matters.
Re:How to draw an outline in a video game by mezentius on Saturday January 04, 2025 @05:53PM (#42598274)
A simple technique not listed here for drawing contour edges:

1) Create an array storing all unique edges of the faces (each edge being composed of a vertex pair V0, V1), as well as the two normals of the faces joined by that edge (N0 and N1).

2) For each edge, after transformation into view space: draw the edge if sign(dot(V0, N0)) != sign(dot(V0, N1)).

There are no comments on this comment yet.