- Home /
Question by
SaranShan · Jul 13, 2016 at 09:16 AM ·
shadersshader programmingshader writingsurface shadersurfaceshader
How to add Zbuffer to Custom Surface Shader
I am New to Shader. Zwrite ON not working with this Surface Shader
SubShader {
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Background"
}
LOD 200
CGPROGRAM
#pragma surface surf Lambert vertex:vert addshadow no alpha
struct Input
{ };
void vert(inout appdata_full v) { };
void surf(Input IN, inout SurfaceOutput o) { };
this is the Structure I am Using. Help me write Z depth for this Surface Shader
I tried with Render Queue Value its affecting overlaped and intersected mesh. Also refer me study material for shader programing
zbufferproblem.jpg
(376.0 kB)
Comment
Answer by cnguyen_magmic · Sep 03, 2017 at 02:59 PM
You should use Geometry Queue instead of Transparent.
Your answer
Follow this Question
Related Questions
Shading is visible through object using surface shader 0 Answers
CRT shader but NOT for camera 0 Answers
Shader Color 1 Answer