[Webkit-unassigned] [Bug 98962] New: [CSS Shaders] Clamp input colors before blending
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 10 15:52:34 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=98962
Summary: [CSS Shaders] Clamp input colors before blending
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: mvujovic at adobe.com
CC: dino at apple.com, achicu at adobe.com,
luxtella at company100.net
Blocks: 71392
In CustomFilterValidatedProgram.cpp, we use the following GLSL code to blend the element texture (premultiplied with css_ColorMatrix) and css_MixColor.
mediump vec4 originalColor = texture2D(css_u_texture, css_v_texCoord);
mediump vec4 multipliedColor = css_ColorMatrix * originalColor;
mediump vec3 blendedColor = css_BlendColor(multipliedColor.rgb, css_MixColor.rgb);
The css_BlendColor function and blending in general expects valid color values between [0.0, 1.0]. Thus, we should clamp multipliedColor and css_MixColor to [0.0, 1.0].
If we clamp the input colors to css_BlendColor, css_BlendColor will return a color in the range [0.0, 1.0].
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list