Answers for "decal z fighting unity"

0

decal z fighting unity

Shader "BlendedDecal"
{
	Properties
	{
		_Color ("Tint", Color) = (1,1,1,1)
		_MainTex ("Texture", 2D) = "white" {}
	}
	
	SubShader
	{
		Lighting Off
		ZTest LEqual
		ZWrite Off
		Tags {"Queue" = "Transparent"}
		Pass
		{
			Alphatest Greater 0
			Blend SrcAlpha OneMinusSrcAlpha
			Offset -1, -1
			SetTexture [_MainTex]
			{
				ConstantColor[_Color]
				Combine texture * constant
			}
		}
	}
}
// create this shader and apply to your material
// add the texture, decal you need and apply material to your quad
// tada.. magic
Posted by: Guest on May-17-2021

Browse Popular Code Answers by Language