On Jan 3, 2008 8:12 AM, Tommi Komulainen <[EMAIL PROTECTED]> wrote:
> On Dec 28, 2007 12:01 AM, Emmanuele Bassi <[EMAIL PROTECTED]> wrote:
> > the ClutterShader object holds the shaders GLSL source code and can be
> > applied to an actor using the clutter_actor_apply_shader() function. the
> > shader will then be compiled and bound to the actor paint sequence. it
> > is also possible to set the value for named parameters.
>
> Could you elaborate the semantics of applying a shader to, say,
> ClutterGroup or the stage?

Currently applying a shader to a group (or the stage which can also be
considered a group) has the same effect as the shader being applied to
all the individual actors in the group. If any of the actors in the
group (or a subgroup) has an applied shader that
actor and any children will have that shader applied instead of the
parent groups shader.

> Since shaders are bound to painting vertex shaders obviously won't
> affect clutter's idea of bounding boxes and such. Similar to scaling I
> suppose, though I can't recall it being explicitly mentioned. Might be
> worth documenting how different things are (not) related.

It might be possible to apply vertex shaders to the pick mode painting if it is
considered very important, as of now this is not being done.

> (I'm wondering whether shaders would be useful for implementing "full
> scene" effects such as blurring half/whole stage simulating a glass
> plate.)

One of the current problems I've seen when trying to implement a full
screen blur by applying a shader to a group is that the blurring is
applied to the individual textures of the glyphs in text, this leads
to sharp edges on the glyphs which is not really desirable. Another
problem is applying such full screen effects in addition to effects on
individual actors since the shader on the individual child of the
group would override the shader on the group for that actor. As long
as you only do point operations or very small radius blurs you can
probably get away with it though. The safest bet for full screen
effects is
using only point operations.

To make the ability to apply shaders to group behave more like one
would expect, it would probably be necessary to use frame buffer
object FBOs within the clutter rendering pipeline. There is currently
no such support in clutter, and adding it will
require some careful pondering on what consequences it will have.

/Øyvind K.
-- 
«The future is already here. It's just not very evenly distributed»
                                                 -- William Gibson
http://pippin.gimp.org/                            http://ffii.org/
--
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to