W3C home > Mailing lists > Public > www-style@w3.org > October 2011

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

From: Robert O'Callahan <robert@ocallahan.org>
Date: Fri, 7 Oct 2011 14:28:59 +1300
Message-ID: <CAOp6jLYBJz2dNkBSNzD=n-Bp=ciAgjS3M=FudJqRQjMjJ4Sc5g@mail.gmail.com>
To: Chris Marrin <cmarrin@apple.com>
Cc: Gregg Tavares <gman@google.com>, Dean Jackson <dino@apple.com>, www-style@w3.org
On Fri, Oct 7, 2011 at 5:44 AM, Chris Marrin <cmarrin@apple.com> wrote:

> But imagine an author who wants to use a very dense mesh to get smooth
> curves to closely match the curve effect you can get from a fragment shader.
> Mapping mouse positions with such a mesh would require thousands of matrix
> operations, including inverse which is very expensive. Especially on mobile
> hardware, this would be too expensive to be practical.
> When native apps need to do this sort of thing they often will construct a
> second, simpler set of geometry which animates along with the finer mesh and
> is used for things like picking and collision detection. We could do
> something like that, but it would probably be hard to come up with the right
> heuristics.

Choosing a smaller mesh size for picking doesn't sound hard.

And it would still require running the shader in software, which would be
> quite a big impediment to many implementations.

Yes, this is my biggest worry.

I think for now it would be best to not deal with the picking issue and to
> hang on to filter-margin to deal with bounds issues.

If we decide to ignore the event handling problem, then I think
implementations should completely block mouse events from going to the
descendants of an element with a custom filter with a vertex shader. If apps
want to handle those events they can catch them on the filtered element and
perform the coordinate translation themselves. Then later if we decide we
want to support event handling properly, we can add syntax to let authors
opt into it. This will give us more interoperable behavior, and also better
behavior I think --- you don't want mouseovers in one place to light up an
element in another place.

"If we claim to be without sin, we deceive ourselves and the truth is not in
us. If we confess our sins, he is faithful and just and will forgive us our
sins and purify us from all unrighteousness. If we claim we have not sinned,
we make him out to be a liar and his word is not in us." [1 John 1:8-10]
Received on Friday, 7 October 2011 01:29:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:05 UTC