(sw-wr) Rotating cube demo has misrendering on the top and bottom faces when rotated along the z axis
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
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.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
![]() |
||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
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.
Updated•4 years ago
|
Comment 4•4 years ago
|
||
bugherder |
Reporter | ||
Comment 5•4 years ago
•
|
||
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.
Reporter | ||
Comment 6•4 years ago
|
||
screenshot showing what all I did to repro the bug.
Reporter | ||
Comment 7•4 years ago
•
|
||
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
Reporter | ||
Comment 8•4 years ago
|
||
Assignee | ||
Comment 9•4 years ago
|
||
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.
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
bugherder |
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Description
•