W3C home > Mailing lists > Public > public-fx@w3.org > October to December 2011

[css-shaders] Do we need shader blending?

From: Chris Marrin <cmarrin@apple.com>
Date: Thu, 20 Oct 2011 06:30:22 -0700
Message-id: <A5484F19-8171-47F3-AB5A-B8EF9126C29F@apple.com>
To: public-fx@w3.org

The issue of turning on blending modes for a CSS shader came up recently (http://www.w3.org/Graphics/fx/wiki/Custom_Filters#Issue_06), which got me thinking about it. It's important to note that when we talk about blending of the shader, we're not talking about when the filtered element is composited with the page. I thought that was handled by another proposal, although I can't find it at the moment. At any rate, that issue SHOULD be handled as a separate issue.

And we need to realize what a CSS shader does. It takes an input texture, which is the output from the last filter stage, and uses that to generate output pixels for the next filter stage. And without using blending modes we can write an alpha value with the output pixel. The only thing turning on blending would buy us is combining the pixel generated by the fragment shader with the pixel already in the output buffer. Conceptually, the output buffer of the shader starts as transparent black, so I don't think there's ever a need to control the blending modes.

Does that sounds right?

-----
~Chris
cmarrin@apple.com
Received on Thursday, 20 October 2011 13:31:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 20 October 2011 13:31:59 GMT