Open Bug 1737904 Opened 3 years ago Updated 3 years ago

"transform-style: preserve-3d" causes substantial change to antialiasing behavior (for simple testcase with just rotatex/rotatey transforms)

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

REOPENED
Tracking Status
firefox95 --- affected

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Firefox requires a fairly-large fuzzy threshold in bug 1737884, at least in part due to the fact that our antialiasing behavior changes quite a bit when you add or remove transform-style:preserve-3d.

STR:

  1. Compare the two attached testcases (e.g. in two side-by-side tabs, switching back and forth)

ACTUAL RESULTS:

  • In the "2D" testcase, the edges of the shape are pretty smoothly antialiased.
  • In the "3D" testcase, the edges of the shape are noticeably more "crisp" (less fuzzy), but also more stairsteppy.

EXPECTED RESULTS:
Testcases should render approximately the same.

See Also: → 1737884

Note: Chrome 97.0.4676.0 dev renders these two testcases ~identically, to my eye (on my machine).

miko, do you happen to know why "preserve-3d" ends up making things look so different here? (And do you know if it's a known issue [i.e. is this a dupe of some older bug], and is it something that's feasible for us to improve on in the future?)

Flags: needinfo?(mikokm)

FWIW, I ran mozregression with the "3D" testcase here to find out when it became kinda-stairsteppy-looking, and got this regression range, which I think points at bug 1323797:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=8eaf154b385bbe0ff06155294ccf7962aa2d3324&tochange=3e275d37a06236981bff399b7d7aa0646be3fee7

In the build before that^ regression range, the attached testcases do still render differently -- the 2D testcase renders ~1px wider than the 3D testcase -- but otherwise they look very similar to each other, and their edges are similarly smooth.

Anyway -- following that thread to bug 1323797's open dependencies, it looks like this is probably a dupe of bug 1339664.

[EDIT: never mind, bug 1339664 was specific to BasicCompositor which is now removed. Presumably/perhaps the analogous WebRender codepath has a similar issue to bug 1339664 which is why we're seeing the same symptoms in modern WebRender-enabled Firefox that we saw in BasicCompositor-powered Firefox from back when bug 1339664 was filed.]

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(mikokm)
Resolution: --- → DUPLICATE

I think this is WebRender related.

Status: RESOLVED → REOPENED
Component: Web Painting → Graphics: WebRender
Resolution: DUPLICATE → ---

:kvark, can you comment to the bug?

Flags: needinfo?(dmalyshau)
Severity: -- → S3

For reference, here's a screencast showing me switch back and forth between the two testcases, to demonstrate the rendering difference. When capturing this screencast, I had enabled the Ubuntu accessibility "Zoom" feature, to scale up the (now-virtual) display pixels, & to make the rendering difference easier to see.

Attachment #9250027 - Attachment description: screencast showing the rendering difference → screencast showing the rendering difference (look closely at the top and bottom edges of the blue shape)
Attachment #9250027 - Attachment description: screencast showing the rendering difference (look closely at the top and bottom edges of the blue shape) → screencast showing the rendering difference (easiest to see if you play video in full-screen mode, and look closely at the top and bottom edges of the blue shape)

Thank you for a nicely detailed issue! When we are in preserve-3d mode, we stop anti-aliasing. This has been known for a while, but we didn't get to fixing it (yet).

Flags: needinfo?(dmalyshau)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: