[Bug 23014] Backface-visibility cannot be tested by only looking at m33

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23014

Tien-Ren Chen <trchen@chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trchen@chromium.org

--- Comment #2 from Tien-Ren Chen <trchen@chromium.org> ---
Replying to Shawn's comment. The proposal (1) of using winding direction won't
work because we won't be able to distinguish rotateY(180deg) and scaleX(-1)
that way. Both will change the winding direction, but rotateY(180deg) should be
considered the plane being rotated to the back face while scaleX(-1) should be
considered the contents on the plane being mirrored.

However I found there is an alternative to proposal (2) when I studied some
perspective bug in Chromium. Here is my abandoned CL:
https://codereview.chromium.org/1047463002/

For a short summary,
Proposal (2) calculates det|M33| * det|M| < 0
My proposal calculates det|M33| * det|M34| > 0

Both formulas behave the same on regular matrices that does xyz transform first
and applying a positive perspective at last. The difference stands where they
handle negative perspective. i.e. The farther in z, the bigger the object
seems. The proposal (2) prefers xyz space, where my formula prefers xyw space.

That is, for perspective(-1px), proposal (2) says front, my proposal says back.

Note that my formula runs 3x faster with finite perspective, and 2x faster with
infinite perspective. Due to avoiding to calculate 4x4 determinant.

I think the spec should be clear about how to handle the case where the forth
row of the matrix can't be generated by simple positive perspective. (Negative
perspective is one problem. We can also have w depending on other rows.)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 31 March 2015 23:58:11 UTC