On 7 Jun 2010, at 15:56, Tom Beddard wrote:
Continuing my QC GLSL questions...
Is it possible to take the result of one GLSL patch and use it as
the input to another?
Only in the sense that you can stuck the GLSL shader patch inside a
Render In Image, and take the resulting 2D image into another GLSL
shader patch, or any other type of patch that accepts an image input.
I have a fragment shader that can output a normal map and I would
like to pass this to a separate shader that will actually perform
the colouring. I'm assuming that the first GLSL patch will only be
re-rendered if one of its uniform inputs change?
Yes, but a Render In Image will continue to output an image as long
as it's connected to something, even if it's not re-rendering it.
My shader does some heavy ray-marching calculations (like the stuff
shown on my site) so if I can pass on the resultant normal and
depth map to a second shader then colouring should be much quicker.
I'm really intrigued to see this in action, as it's exactly the sort
of thing I want to do, if I ever get the time.
Ideally, I'd really like the first shader to output two buffers
(normal+depth and position) as inputs to the second shader so I can
do stuff like screen-space ambient occlusion.
Ah, that you can't do, unfortunately, unless you have a duplicate
GLSL Shader patch inside Render In Image patch setup with the same
inputs, but different shader programs. You can't render to multiple
render targets in a single GLSL patch in QC, unfortunately.
a|x
Thanks
T.
--
Tom Beddard
www.subblue.com
twitter.com/subblue
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (Quartzcomposer-
d...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/the_voder%
40yahoo.co.uk
This email sent to the_vo...@yahoo.co.uk
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com