Home > front end >  Making Materials Transparent in Unity
Making Materials Transparent in Unity

Time:10-15

So I'm trying to add an effect to a game object where the transparency of its materials will grow over time until it hits a threshold, then go back to normal, and repeat for a predetermined amount of time. I made it so I can make them transparent after a bit of research, but my issue is now just trying to use the best transparent shader.

I first used the UI/Unlit/Transparent shader where I could just grab the alpha value and increment/decrement it as I wanted and made it go transparent, but my issue was that the tint of that material would make it blindingly white, which I don't know if I can do anything about since I am using PNGs as the material so I can't just edit the tint to not affect the material I think.

Then I used the Unlit/Transparent shader but that only has _MainText or Diffuse, which doesn't have a way to edit the transparency without a custom shader is what I've found after scrolling through Unity Answers and other StackOverflow posts.

Is my only option to write a custom shader for Diffuse to get this to work or is there something obvious that I'm missing for these shaders?

CodePudding user response:

Alright I figured out that all I had to do was check off the "Use Alpha Clip" option on the UI/Unlit/Transparent shader and it only uses the alpha variable and not the tint

  • Related