[cwood]

vec4 output = color + Color; // urgh at the naming there! ;D
output.rgb *= output.a;
return output;

[cwright]
use a different name, like vec4 comspositeColor.

[gtoledo]
Thanks for that suggestion as well... not working for me though. I just keep getting a "void function cannot return value", and I've tried a few variations on this theme.


So literal :)

a fragment shader doesn't _return_ a value (hence the "void main" at the beginning), it sets gl_FragColor. This was probably a brevity oversight on cwood's part, but the idea is sound -- you could alternatively do something like this:

vec4 compositeColor = color + Color;
compositeColor.rgb *= compositeColor.a;
gl_FragColor = compositeColor;  // <--- not return

(after more testing, it's just this shader that's exploding my machine, not other glsl shaders in QC... no idea what's going on with that... one would think that GMAs were the worst GPUs on the planet, with drivers to match or something ;)

--
[ 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