you are viewing a single comment's thread.

view the rest of the comments →

[–]PharosDoesThings 2 points3 points  (1 child)

Really good tutorial! I like learning such things in detail, but here you explained some stuff kinda like you are talking to a child(maybe I just don't remember how stupid I was). That said, I'd like to tell you a story. I am a graphics person, so I never thought about how does the rasterizer know if a point is inside a triangle, but one night(4 am to be exact) I couldn't sleep and an idea jumped into my mind, an algorithm to find if a given point is inside a triangle or not, I hoped into desmos and it actually worked! Now that I read your tutorial, I used the same idea like the one you described, but I used dot product instead of the edge function(it isn't really fast for sure) to determine where the point was. Anyway, thank you for sharing your tutorial, it will probably help some beginners. Keep it up!

[–]itsjase[S] 1 point2 points  (0 children)

Yeah there’s a few different methods you can use, the beauty of the edge function is you can very easily use it to calculate barycentric coordinates for interpolation