Skip to content

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

@jdz1993

Description

@jdz1993

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions