Re: [css-shaders] CSS shaders for custom filters (ACTION-3072)

On 04/10/2011, at 7:16 AM, Gregg Tavares (wrk) wrote:

> What about mouse input?
> 
> It seems like for this proposal to actually work as other CSS works
> you'd need to run mouse and touch events through the vertex shader so
> that you get the mouse coordinates translated through the shader.
> 
> Yes? No?

When I first read this I thought you were asking for the current pointer coordinate to be provided as a default input to the shader pipeline. That's an interesting idea and might avoid scripting in some cases (you could always do it with custom parameters in the proposal Vincent sent). We'd need to decide which coordinates though - screen, page, element.

But that's not what you're asking, I think :)

Since a vertex shader could potentially transform the element to a different position, you're wondering how this affects the typical CSS selection (like :hover). This isn't really specific to the shader-based proposal - a displacement map could move an element, or a filter could make it transparent. Unless someone can tell me otherwise, I believe our current resolution is that we do selection in relation to the unfiltered input.

There was a related discussion at the last CSS f2f meeting about improving the way pointer-events work. Zynga have suggested they need a way to make transparent pixels invisible to clicks. We're still working on this (I have an ACTION item I need to do).

Dean

Received on Tuesday, 4 October 2011 03:13:09 UTC