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

Hi Alex,

>A question on this point. Does the current url() rule allow
>referencing an inline shader definition? e.g.:
>
><script id="vertexshader" type="x-shader/x-vertex">
>...
></script>
><style>
>  #el {
>     filter(url("#vertexshader"), .... );
>  }
></style>

Yes, you could do this. We have not implemented this in our prototype yet,
but it is in the spec (see "Note 7" in
https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html#feCustom),
exactly what you are asking for:

<script id="warp" type="x-shader/x-vertex" >
<-- source code here -->
</script>

..
<style>
.shaded {
    filter: custom(url(#warp));
}



Cheers,
Vincent

Received on Thursday, 6 October 2011 15:42:36 UTC