Disable z write on alpha blend shaders

This commit is contained in:
Nahuel Rocchetti 2023-07-30 21:44:40 -03:00
parent 4d724abc86
commit 1d4589a408
4 changed files with 6 additions and 3 deletions

View file

@ -11,6 +11,7 @@ Shader "OpenTS2/LotImposterBlend"
Pass
{
ZWrite Off
Offset -1, -1
Blend SrcAlpha OneMinusSrcAlpha
//ZWrite Off

View file

@ -4,16 +4,16 @@ Shader "OpenTS2/Road"
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_AlphaCutOff("AlphaCutOff", Float) = 0.5
_TerrainWidth("Terrain Width", float) = 128
_TerrainHeight("Terrain Height", float) = 128
_ShadowMap("Terrain Shadow Map", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
Tags { "Queue"="Transparent" "RenderType"="Transparent" }
LOD 200
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
// Physically based Standard lighting model, and enable shadows on all light types
#pragma surface surf CustomLambert fullforwardshadows alphatest:_AlphaCutOff

View file

@ -11,6 +11,7 @@ Shader "OpenTS2/Water"
}
SubShader
{
ZWrite Off
Tags {"Queue" = "Transparent" "RenderType" = "Transparent" }
LOD 200

View file

@ -9,6 +9,7 @@ Shader "OpenTS2/StandardMaterial/AlphaBlended"
}
SubShader
{
ZWrite Off
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
CGPROGRAM