1
$\begingroup$

I'm making a triangle rasterizer for my 3d engine because I forgot to make a depth buffer and I was wondering what is the fastest way to rasterize a triangle,

I was thinking bresenham combined with another algorithm I found in this video (skip to 6:47) https://www.youtube.com/watch?v=PahbNFypubE&t=437s for horizontal slopes

or I could use bresenham but clear out the useless points to make it easier to draw pixels with lines for every y coordinate

let me know if you have better ideas and even better, benchmarked them

$\endgroup$
2
  • $\begingroup$ What do you mean by “I forgot to make a depth buffer”? How do you handle overlapping triangles? $\endgroup$
    – lhf
    Commented Apr 27 at 19:48
  • $\begingroup$ I made a camera and mesh loader and stuff but and instead of using a depth buffer i just sorted the triangles by distance and forgot that some triangle can go through eachother $\endgroup$
    – samone123
    Commented Apr 27 at 23:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.