GLSL and varying opacity

franz's picture


i'm desperatly trying to animate the alpha of a GLSL's surface color. It doesn't seem to work and dev. examples do not help me (really):

setting R or G or B value with a color patch connected to the GLSL patch has the expected effect (surface color is actually changing), however, modifying the alpha value doesn't work. I know i must be wrong, somewhere.

Any GL guru around to have a look at my sample file ? thanxx a lot.

GLSL-opacity-issue.qtz287.21 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

toneburst's picture
Blending Mode

You need to set the Blending mode of whatever mesh object you have inside your GLSL Shader patch to something other than the default 'Replace' mode (ie 'Over' 'Add' or if you have the latest GL Tools installed, 'Alpha').


franz's picture

oops, sorry, so stupid of me... i was brain-looping inside the GLSL patch... thanks again for re-teaching me the basics. i definetly need some rest.

toneburst's picture
Easy mistake to make

I'm sure I've done the same thing myself. Actually, the whole transparency thing seems to be a bit of a minefield, what with Z-Fighting issues, and CIFilter weirdness.