This is un-possible with any OpenGL implementation afaik. OpenGl only allows one shader to be bound at a single time, and as far as I know must be unbound before another is activated. The solution typically is, if you need more than one vertex shader, you much make a new one with the combined operations. If you need vertex/texture effects and then want to apply global blurs, etc, use render to texture (or, in QC, render to image).

Im pretty positive this is not going to be an option any time soon. However, ive been known to completely misunderstand things before :)

On Feb 2, 2008, at 8:42 AM, Alex Drinkwater wrote:

Hi,

Is there any chance that in a future version of Quartz
Composer, it may be possible to 'nest' GLSL patches
inside each other, (such that the nested geometry of
the inner shader is available to the container
shader), or otherwise 'cascade' them, so that the
entire geometry output of one shader is available as
input to another?

I've tried nesting a shader inside another in QC 3.0,
and sadly, it doesn't appear to work. I can see the
output of the inner GLSL patch, but shader code in the
containing patch has no effect.
It is however possible to use an Iterator inside a
GLSL patch, to, for example, create a number of Sphere
primitives, which can be processed by the GLSL Vertex
and Fragment shaders programs in the containing patch.
It's also possible to nest a GLSL patch inside a 3D
Transform or Trackball patch, so I know that the GLSL
patch is outputting geometry data, rather than just a
pre-rendered image. It seems a shame that you can't
access this from a second shader...

I know it's possible to cascade GLSL shaders in this
way in other programs- for example, it's possible to
create multi-shader effects using RenderMonkey (though
admittedly this is under Windows).

I've also been thinking it would be very useful to
have some equivalent of the Core Image Filter patch's
'Edit Filter Function' option, whereby JavaScript
could be used to create a chain of shaders. Just
wondering if anyone out there has any thoughts on this
idea...

Cheers,

alx
http://machinesdontcare.wordpress.com


     __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected] )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/doktorp%40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to