- Home /
How to change a texture's (or a material's ?) opacity ?
Well if you know how to change an entire game object's opacity, it's fine too, but I don't think it's possible.
Edit : More information. I would like to apply a water texture on a game object, and make it transparent. I already know about the transparent shaders, but they won't help me...
Re: changing GObj opacity, that sounds to me alot like the often request 'Fade out object' except you'd want to stop the fade from going all the way. This is frequently done by changing the $$anonymous$$aterial's alpha channel
Because I need the water texture, and I don't think I can mix a water texture with a transparent shader
The only alpha channel I know on a material is applied to its color, and if I have a water texture, there is no color
Perhaps you are going for something like this?
http://www.youtube.com/watch?v=kPQJTml1eJs
don't worry about the plane/position/scale stuff, but the $$anonymous$$aterial and texturing setup.
Answer by joelfivat · Jan 27, 2014 at 03:41 PM
The shader is basically a program executed by your graphic card that will compute the color of each pixel of an object.
The shader will take input (texture, values, colors, ...) to compute the pixel colors.
So, for transparency, first you need a shader that handles transparency and then you need to set the right input to the shader.
Usually, a shader takes the alpha channel of the main texture (RGBA) to compute the transparence of the pixels, but that can change according to the shader you are using.
The shader inputs are defined in your material and materials are just another name for a shader with specific inputs.
So, for your problem, you probably need a texture with an apha channel set to half-transparency and set it as the main texture of a shader that handles transparency.