Im just planing a triangle rasterizer on GPU (GLSL) and I came across an algorithm that could remove barycentric coords (which is quiet expencive to copute) from rasterization.
Given the triangle ABC with the edges abc and the linear equation f. In the first step I check each of the edges abc for intersection with f, (the triangle is already projected in R²) then I take the factor from the linear equation of abc (each edge is an linear equation) and use this parameter in R³ for determinating a new equation which conects the two intersection points on two differnt edges of the triangle. So now I can fill my triangle line by line (the pixels between the intersection points are filled). Based on the linear equation in R³ (of the intersection points) I can now determinate the R³ cooeds of each pixel so I have a depth value.
I know it's a bit complicated so if you have any quaestion please ask me.
So do you think it's possible this way and if yes, is iit faster ?? If I forgot anything or if I did a mistake please inform me. If you have any optimisation idea or something else please inform me.