Closed Bug 1704750 Opened 4 years ago Closed 4 years ago

(sw-wr) Rotating cube demo has misrendering on the top and bottom faces when rotated along the z axis

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: mayankleoboy1, Assigned: lsalzman)

References

(Blocks 5 open bugs)

Details

Attachments

(7 files)

1.enable SW-WR
2.go to https://3dtransforms.desandro.com/cube and scroll to the very bottom, where there is a demo you can play with.
3. Rotate the cube from front to right/ front to back .

ER: proper rendering
AR: There is some rendering artifact on the top face and the bottom face of the cube

Fun twist: If you open the demo in Codepen (https://codepen.io/desandro/pen/KRWjzm) the artifacts appear if you select the text on the front face of the cube and then rotating.

Severity: -- → S4

The original triangle winding check was designed to be run inside the span
rasterizer every time the edges changed. However, at present, this only ever
gets used once at the very top of the triangle to determine winding and then
assumes winding is constant thereafter.

This updates the check to work on these assumptions to be simpler and less
fragile where numerical precision is concerned. If we can assume the candidate
edges both start on the same row, then the check boils down to seeing if they
share the same starting point and doing a cross-product.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/097daf3a851d Use simpler check for triangle winding. r=aosmond
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Attached file testcase.html

Rotate the red square such that it intersects one of the edges of the window. If need be, increase the size of the red square, or just increase the zoom level.
Or, open the developer toolbar and dock it to the bottom of the page and increase its height till it start intersecting with the red square. Then try rotating the red square. The bug should repro.

Flags: needinfo?(lsalzman)
Attached image bug.png

screenshot showing what all I did to repro the bug.

Attached file Simpler testcase.html

Hopefully a much simpler testcase.

STR: Increase the zoom of the page till the bottom point intersects the browser window. Then start resizing the browser horizontally with the mouse till you see the artifact
Edit: You can probably remove the preserve-3d and backface-visibility thingy

Floating point imprecision can cause the existing test to be unreliable. Just simplify it so it loops around till it overlaps one edge with another. This does a tiny bit more work but will have less chance of exiting earlier than it should.

Attachment #9220117 - Attachment description: Bug 1704750 - Simplify rastizer edge termination condition. r?aosmond → Bug 1704750 - Simplify rasterizer edge termination condition. r?aosmond
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fb960d468a07 Simplify rasterizer edge termination condition. r=kvark
Blocks: 1710133
Flags: needinfo?(lsalzman)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: