| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
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).
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).
-- [ christopher wright ] email@hidden http://kineme.net/
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden
| References: | |
| >Nesting GLSL Patches (From: Alex Drinkwater <email@hidden>) | |
| >Re: Nesting GLSL Patches (From: vade <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.