- Home /
Shader: Adding alpha
I have a shader material which I pulled from here: http://forum.unity3d.com/threads/31163-Atmospheric-Scattering-In-Unity-from-GPU-Gems-2, for atmospheric scattering. I am fairly new to shaders, and this is way over my head. I'm looking for a way to add an alpha layer/filter to this shader so that anything that is black, > an rgb of (20, 20, 20) is not rendered, transparent. Any shader guru's out there with some advice?
P.S. - I'm looking to do this with the SkyFromAtmosphere shader.
Answer by ForgeStudios · Dec 01, 2013 at 12:08 AM
Tags{"RenderType" = "Transparent"}
That is not enough. It's like pretending that a B$$anonymous$$P image will have transparency if you save it as PNG.
The link of the question no longer contains any working link, so here is my copy of the project: https://www.dropbox.com/s/d99beibmthmbgbf/GPU_GE$$anonymous$$S_atmosphericScattering.zip?dl=0
Answer by vistaero · Jan 28, 2018 at 07:08 AM
Replace:
Tags { "RenderType"="Transparent" }
By:
Tags { "Queue"="Transparent" "RenderType"="Transparent" }
Blend One One
Your answer
Follow this Question
Related Questions
Procedural Generated Galaxy 2 Answers
Complicated shader problem 0 Answers
Physically Based Sky for space games - HELP with settings 1 Answer
Accessing the alpha blend variable in a custom shader 1 Answer
Advanced Shaders 1 Answer