Thanks cwright! I get it now. I wasn't putting the gl_FragColor line in the right place.... really obvious oversight.
I'm attaching the "working as expected" shader. (I'm still scratching my head a little bit about why, if color is alpha=0 already in the vertex shader, and my source texture is composited over alpha, why this is necessary.) Too bad that the shader is blowing up your machine ( I wonder if the classic vertexnoise glsl would do the same, as it's largely the same). -George On Sun, Jun 20, 2010 at 10:26 AM, Christopher Wright <cwri...@kineme.net>wrote: > [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/ > >
GLSL - Texture + Color fixed.qtz
Description: Binary data
_______________________________________________ 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