- Home /
How to use shader for Texture2D
I like to use shader for Texture2D .And then i need to use that texture. How can i do it in C#
renderer.material.shader = Shader.Find("Unlit/Transparent Cutout");
GUI.Button (new Rect (0,0,Screen.width,Screen.height),images3)
Answer by Fabkins · May 10, 2012 at 11:51 AM
Not sure what you are trying to do.
Are you trying to use a different shader for the a GUI.Button? If you are it wont work. If you want a button that is transparent in places then just make sure the "image3" has a alpha channel. So use an applicable file format like PNG.
Thank you for your reply. The reason i used shader for transparent.I have PNG format image.But it show some white pixel
'white' is not the same as 'transparent'- this is why a typical image file has four channels- red, green, blue and transparency.
Your answer
![](https://koobas.hobune.stream/wayback/20220613071322im_/https://answers.unity.com/themes/thub/images/avi.jpg)