- Home /
Using Grayscale Textures For Transparency
I have a set of textures which are compressing as DXT5 (RGBA)... but all I need is the Alpha. A lot of space would be saved by finding a way to store these textures with as single channel or at least DXT1, and coax Unity to use the grayscale as Alpha.
I need this for a GUI which uses a few large textures. The textures are pure white with lots of detail in their transparency channel. I use the GUI.color to set the desired color of each texture as I render it with GUI.DrawTexture.
I cannot find a way to use GUI.DrawTexture with a black and white DXT1 to achieve a blended effect. Is this possible?
Thanks! denrei
Answer by Jessy · Dec 18, 2010 at 09:13 PM
No. You do not have access to the shader that is used for UnityGUI, so you are forced to use the alpha channel for this sort of thing, unless you don't use UnityGUI for this graphical element.