- Home /
Is there a built-in transparent texture to use in shaders?
So, I'm writing my shader and I would like to have null textures to be all Color(0, 0, 0, 0).
At http://docs.unity3d.com/Documentation/Components/SL-Properties.html it says that "For texture (2D, Rect, Cube) the default value is either an empty string, or one of built-in default textures: "white", "black", "gray" or "bump". But there's no "transparent" one. So, for every texture used I have to check it for null, if it is I create an empty texture which is created not transparent so I have to clear it myself.
RenderTexture.active = tex;
GL.Clear(false, true, new Color(0,0,0,0));
Which is too much work for such a simple case. Is there a way to make it easier?
I wowuld also like to hear if there is an answer to this.
Thanks
Your answer
![](https://koobas.hobune.stream/wayback/20220613124803im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rendering a G-Buffer for a cubemap 0 Answers
Adding Transparency to Custom Unity Shader 1 Answer
Transparency with different colors? 0 Answers
Can i make this shader an alpha cutout 1 Answer
Transparent Camera layer rendering 0 Answers