Question by
Chocolade · Jan 30, 2018 at 11:44 PM ·
shadershaderstransparencyshader programmingtransparent
How can I add alpha channel to this shader and how can I make the object to be transparent ?
Nm sorry i did a mistake and needed to delete
trans.jpg
(62.1 kB)
res111.jpg
(18.0 kB)
Comment
Answer by KriskyD · Jan 31, 2018 at 12:16 AM
All that comes to mind is:
setting
main.a = 0;
/mask.a = 0;
using transparent cutout by for example
clip (main.a - someValue);
, where whenmain.a - someValue
is lower than 0, pixel won't be rendered. It's useful when your mask is making the object fade.making fully transparent texture
Where do I add this settings and variables in the shader code ? Could you give me an example of how the shader should look like with this settings and variables ?