- Home /
Specific emission effect request
I have a gane that has tiles that spawn in enemies. However, I want the tiles to have a glow effect starting around the edges and going up, and gradually disintegrating as you look higher and higher. so, at the roots of the tile itll be full green or 50% alpha or some color and alpha combination, and fade to another combination. Can I use a material with an alpha texture to accomplish this? and if so how?
Answer by tanoshimi · Dec 11, 2015 at 08:02 PM
I'm not sure what you need the texture for - if it's full (opaque) green at the base, you just need the shader to lerp from (0.0,1.0,0.0,1.0) at the base to (0.0,1.0,0.0,0.5) at the top based on the supplied vertex.y position.
I dont know shaderlab very well. Can you demonstrate please?
Im stuck at this:
Shader "Custom/Color Lerp" {
Properties {
_Foreground ("Foreground Color", Color) = (1, 1, 1, 1)
_Background ("Background Color", Color) = (1, 1, 1, 0)
}
SubShader {
}
}
}
Your answer
Follow this Question
Related Questions
Glow Effect on player unity 0 Answers
Changing Emission Scale UI with Script 0 Answers
Surface Shader - Emission 1 Answer