[css-shaders] Do we need shader blending?

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 UTC