[jitter] Re: Re: first shader, first troubles
Andrew Benson
andrewb at cycling74.com
Thu May 15 09:47:24 MDT 2008
- Previous message: [jitter] Re: first shader, first troubles
- Next message: [jitter] Re: first shader, first troubles
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
GLSL doesn't do well with implicit type casting. You have to always be explicit about moving from one data-type to another. In this case, gl_FragColor is expecting a vec4. If you want to pass the alpha channel and set all other channels to 0., you could do the following: gl_FragColor = vec4(pl,0.,0.,0.); But it sounds like you are looking to add this alpha channel to another texture, which would be better accomplished using a shader similar to cc.alphaglue.jxs. You should be able to alter that shader to your needs fairly easily. AB -- Andrew B. -- Cycling '74 Support
- Previous message: [jitter] Re: first shader, first troubles
- Next message: [jitter] Re: first shader, first troubles
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
