- Home /
Question by
$$anonymous$$ · Apr 02, 2015 at 04:25 PM ·
shaderdecalmultiply
Shader Decal - Multiply / Add not simple blend by alpha
Hi, i'm using this simple Unlit decal shader.
Properties {
_Color ("Main Color", Color) = (1, 1, 1, 1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_DecalTex ("Decal (RGBA)", 2D) = "black" {}
}
SubShader {
Tags {
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Pass {
BindChannels {
Bind "Vertex", vertex
Bind "normal", normal
Bind "texcoord", texcoord0 // main uses 1st uv
Bind "texcoord1", texcoord1 // decal uses 2nd uv
}
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * constant
}
SetTexture [_DecalTex] {
combine texture lerp (texture ) previous
}
}
}
How can i add or multiply the decal to the maintexture? Someone? Thanks in advance!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613192010im_/https://answers.unity.com/themes/thub/images/avi.jpg)