I tried to use this custom shader from here : GitHub - keijiro/CrossFadingLod: (Unity) Cross-fading LOD shader example
but the transition is completely white not transparent, tried many ways like enabling ZWrite…etc with no much help.
and idea how I could fix this?
here is the code:
Shader “Custom/CrossFadingLod”
{
Properties
{
_Color (“Color”, Color) = (0,0,0,1)
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
_Cutoff ("Base Alpha cutoff", Range (0,0.9)) = 0.85
}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
LOD 200
CGPROGRAM
#pragma multi_compile _ LOD_FADE_CROSSFADE
#pragma surface surf Standard alpha:fade
//#pragma surface surf Standard fullforwardshadows alpha:fade
#pragma target 3.0
sampler2D _MainTex;
struct Input
{
float2 uv_MainTex;
UNITY_DITHER_CROSSFADE_COORDS
};
half _Glossiness;
half _Metallic;
fixed4 _Color;
void surf(Input IN, inout SurfaceOutputStandard o)
{
// Albedo comes from a texture tinted by color
fixed4 c = _Color;
o.Albedo = c;
// Metallic and smoothness come from slider variables
o.Metallic = _Metallic;
o.Smoothness = _Glossiness;
#ifdef LOD_FADE_CROSSFADE
o.Alpha = c.a * unity_LODFade.x;
#else
o.Alpha = c.a;
#endif
}
ENDCG
}
FallBack "Transparent/Diffuse"
}