feComponentTransfer /feFuncA results in visible banding

UNCONFIRMED
Unassigned

Status

()

Core
SVG
UNCONFIRMED
4 years ago
2 years ago

People

(Reporter: Michael Mullany, Unassigned)

Tracking

18 Branch
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [bugday-20131028])

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
Created attachment 821382 [details]
screenshot of the bug

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1

Steps to reproduce:

SVG Filter Bug
Created a spotlight using feDiffuseLighting. 
Ran it through a feColorMatrix - L2A to get a mask. 
Tried to apply a feComponentTransfer/feFuncA- table to invert and threshold



Actual results:

Instead of a smooth remapping of the alpha channel using feFuncA, there is very visible banding in the resulting graphic


Expected results:

Should have been remapped smoothly (as in Chrome/Safari) - attached. 
Live example at: http://codepen.io/mullany/pen/yckph

(The light seems to be just fine (no banding) before it's run through the component transfer)
(Reporter)

Comment 1

4 years ago
Actually that first attachment is the *unexpected* bad result from Firefox - not the smooth, expected result (sorry!)

Updated

4 years ago
Attachment #821382 - Attachment description: Expected result.png → screenshot of the bug

Comment 2

4 years ago
Looks similar in 2013-10-28-03-02-05-mozilla-central-firefox-27.0a1.en-US.linux-x86_64 (w/o graphics acceleration).
Component: Untriaged → SVG
OS: Mac OS X → All
Product: Firefox → Core

Updated

4 years ago
Whiteboard: [bugday-20131028]
Comment hidden (obsolete)
Comment hidden (obsolete)
Comment hidden (off-topic)
Status: RESOLVED → UNCONFIRMED
Resolution: WONTFIX → ---
Created attachment 823807 [details]
simpler testcase
Attachment #823807 - Attachment mime type: text/plain → image/svg+xml
(Reporter)

Comment 7

4 years ago
Here is a test case that shows three implementations of the original contrasty vignette. The first shows default filterRes. The second shows a 2x filter res, with light source positions scaled by 50% to match the new resolution. The third shows the default filterRes combined with a 0.5 kernelUnitLength - with lightSource positions adjusted by 200% to produce the same effect. All cases show the banding artifacts.

http://codepen.io/mullany/pen/qJsvI

(btw firefox is the only browser to implement both kernelUnitLength and filterRes. Webkit/Blink doesn't implement kernelUnitLength, and IE doesn't implement filterRes.)
(Reporter)

Comment 8

4 years ago
One last comment on this. The spec does require all UA's to produce a high quality result - from the spec: "the user agent will use reasonable values to produce a high-quality result on the output device." With all due respect for the work that Firefox has done to advance the state of SVG, in this particular case, the Firefox output is significantly worse than competitive browsers - and one would be hard pressed to call it "high quality".
Duplicate of this bug: 1271090
You need to log in before you can comment on or make changes to this bug.