how can i blend textures on a specific place on another texture and change it's alpha value?
I am trying to do a splash effect when an object is hit.
I've been playing around with shaders and got to a point that i can blend two textures on a position determined by inspector. But i can't change it's alpha value no matter what and i see no way of adding a new texture on different place.
Anyone could help?
Here's my shader code if that helps (i don't really understand it :D )
Shader "Examples/2 Alpha Blended Textures" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_Color ("color", Color) = (1,1,1,0.5)
_BlendTex ("Alpha Blended (RGBA) ", 2D) = "white" {}
}
SubShader {
Tags {
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Lighting Off
ZWrite Off
Cull Back
Blend SrcAlpha OneMinusSrcAlpha
Material {
Emission [_Color]
Diffuse [_Color]
}
Pass {
SetTexture [_BlendTex] {
constantColor[_Color]
combine constant * texture // this thing doesn't work here
combine texture lerp (texture) previous //but when theese two lines are swapped, the alpha works but the base image disapears
}
}
}
}
Comment
Your answer