- Home /
Question by
scorpi1988 · Dec 02, 2013 at 05:56 PM ·
shaderadditivequeue
Additive shader with zbuffer off
I',m trying to get additive shader without zbuffer. But it's not working. Please HELP.
Shader "Particles/Additive (Overlay)" {
Properties {
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
_MainTex ("Particle Texture", 2D) = "white" {}
}
Category {
Tags { "Queue"="Geometry+6000"}
Blend SrcAlpha One
AlphaTest Greater .01
ColorMask RGB
Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
BindChannels {
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
// ---- Dual texture cards
SubShader {
Pass {
SetTexture [_MainTex] {
constantColor [_TintColor]
combine constant * primary DOUBLE
}
SetTexture [_MainTex] {
combine texture * previous
}
}
}
// ---- Single texture cards (does not do color tint)
SubShader {
Pass {
SetTexture [_MainTex] {
combine texture * primary
}
}
}
}
}
Comment
http://docs.unity3d.com/Documentation/Components/SL-CullAndDepth.html You can't disable the depth buffer; you can just choose how to test against it and whether or not to write to it.
Your answer
![](https://koobas.hobune.stream/wayback/20220613123240im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to change when a halo is drawn? 0 Answers
Particle Additive Shader make white strap 1 Answer
3D Text Mesh Shader Z Buffer Issue 1 Answer