rasterizer icon indicating copy to clipboard operation
rasterizer copied to clipboard

Why is the "greaterArea" used as the division when calculating the depthpane

Open jdz1993 opened this issue 4 years ago • 0 comments

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.

jdz1993 avatar Jul 19 '21 12:07 jdz1993