Open Bug 1881665 Opened 3 months ago Updated 2 months ago

CSS angled linear-gradients with very close stops appear very jagged

Categories

(Core :: Graphics: WebRender, defect)

Firefox 123
defect

Tracking

()

Tracking Status
firefox123 --- affected
firefox124 --- affected
firefox125 --- affected

People

(Reporter: slyacezeta, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0

Steps to reproduce:

When making an angled linear-gradient with hard stops, jagged edges appear along the stop. This can be resolved by adjusting the stops to be very close, either by using non-whole percentages (i.e. 9.95% instead of 10%) or adjusting by a single pixel. Compare how the following pen appears in Chrome and Firefox: https://codepen.io/slyacezeta/pen/KKEjPYW

Actual results:

The adjusted stops appear more jagged than the original non-adjusted stops.

Expected results:

The adjusted stops should appear less jagged and more smooth than the original non-adjusted stops.

related: 1833397

Hello I have managed to reproduce the issue with firefox 125.0a1(2024-02-26), 124.0b3 and 123.0 on Ubuntu 22.04 and macOS 12.6 following the STR provided in the description. I will mark this issue as NEW and set a component for this issue in order to get our developers involved and provide a solution for it on further releases.

Have a nice day!

Status: UNCONFIRMED → NEW
Component: Untriaged → Graphics: WebRender
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All

I can also reproduce this on Stable 123.0 and Nightly 125.0a1 (2024-02-29).

Nical, any ideas what would cause this?

Severity: -- → S3
Flags: needinfo?(nical.bugzilla)

The gradient shaders evalute the gradients with a single sample. In other words it does not attempt to do anti-aliasing with hard-stops.

Flags: needinfo?(nical.bugzilla)
Blocks: 1889095
No longer blocks: wr-gradients
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: