Is it possible to take the result of one GLSL patch and use it as the input to another?

You could mean this 2 ways: post-processing image output (use render in image), or applying 2 vertex+fragment shaders to a piece of geometry. The first is supported, the second is not (to apply multiple vertex shaders, you need to do transform feedback behind the scenes, which gets icky). The rest of your comment looks like you're interested in the former, thankfully :)

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? 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.

Deferred rendering?  Nice :)  However, to do this, you need...

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.


... MRT (Multiple Render Target) functionality -- not supported in QC, sadly (killing deferred rendering capabilities :( ). You can make multiple instances inside several render in image patches (each with a different shader), but it's not as fast as doing MRT for real (single geometry pass, etc).

--
[ christopher wright ]
cwri...@kineme.net
http://kineme.net/

_______________________________________________
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

Reply via email to