rasterizer
rasterizer copied to clipboard
Why is the "greaterArea" used as the division when calculating the depthpane
Why is the "greaterArea" used as the division when calculating the depthpane?
Looking at the code (Rasterizer.cpp Line.947), it selects one of the two triangles of the quad by comparing the area projected on the screen plane. Why?
// Compute screen space depth plane
__m256 greaterArea = _mm256_cmp_ps(_mm256_andnot_ps(minusZero256, area1), _mm256_andnot_ps(minusZero256, area2), _CMP_LT_OQ);
Must only one of the two triangles contribute to the final depthPlane?
What if there is a quad composed of two triangles with similar large areas?
If I have an understanding error, please point it out.