feComponentTransfer /feFuncA results in visible banding




5 years ago
3 years ago


(Reporter: mmullany, Unassigned)


18 Branch

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [bugday-20131028])


(2 attachments)



5 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)

Comment 1

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


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

Comment 2

5 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


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

Comment 7

5 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.


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

Comment 8

5 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.