Open
Bug 1446550
Opened 6 years ago
Updated 2 years ago
overlay of canvasses with alpha results in color overshoot
Categories
(Core :: Graphics: Canvas2D, defect, P3)
Tracking
()
NEW
People
(Reporter: derijcke.erik, Unassigned)
Details
(Whiteboard: [gfx-noted])
Attachments
(1 file)
213.90 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.124 Safari/537.36 Steps to reproduce: Render content with alpha channel in offscreen webgl canvas (using a yuv2rgb+yuv2a shader), then render this canvas into different on-screen canvasses (with context2d) Actual results: Background colors seem to 'overshoot' into the canvas, effectively changing the canvas colors entirely (ie a white background makes a green canvas with 50% alpha turn solid purple) Attached: An image with canvas opacity set to 1.0 using css, demonstrates the issue nicely, when setting the canvas opacity to 0.5 using css makes the colors not overshoot. Expected results: Alpha should be correctly applied, colors should not overshoot.
Comment 1•6 years ago
|
||
Can you provide a testcase that demonstrates the issue?
Flags: needinfo?(derijcke.erik)
Reporter | ||
Comment 2•6 years ago
|
||
https://github.com/udevbe/greenfield/tree/ff_bug/browser/public/bug All required resources to reproduce are in the bug folder. Simply open the index.html and be greeted with purple rain.
Flags: needinfo?(derijcke.erik)
Comment 3•6 years ago
|
||
Confirmed on my local linux machine (nvidia proprietary drivers). Also interesting to note that webrender just completely drops the tiled background on the ground altogether (which looks better but is still incorrect).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [gfx-noted]
Comment 4•6 years ago
|
||
Easy link to view the test page: http://htmlpreview.github.io/?https://github.com/udevbe/greenfield/blob/ff_bug/browser/public/bug/index.html
Comment 5•6 years ago
|
||
Maybe the WebGL -> Canvas2D drawImage path fails to clamp color values to valid premultiplied alpha.
Comment 6•6 years ago
|
||
It's worth checking whether initializing the WebGL context with { premultipliedAlpha: false } makes this behave correctly.
Updated•6 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•