Topic: How to make texture transparent by shader?

Hi i'm trying to make texture transparent and gl_FragColor = vec4(pixel.r,pixel.g,pixel.b,0.2) wont do the trick. Tried to do this with color but it just wont make it transparent. I'm using .png image and it has no transparent parts. Is it possible to make it partly transparent by shader? Please advice

Re: How to make texture transparent by shader?

"gl_FragColor = vec4(pixel.r,pixel.g,pixel.b,0.2)" is correct.

But you need to select the correct Blending mode in the material to see it :

http://www.maratis3d.com/wp-content/uploads/2011/01/05.jpg

Re: How to make texture transparent by shader?

Set blend mode to alpha and it worked. Thanks a lot anael.