Adding Unlit\Texture functionality to Unlit\Transparent

Hey guys, when I’m using the Unlit/Texture which is using a fixed pipeline, I can see my models clearly.
When I’m using the Unlit Transparent, the model doesn’t look good, You can see the differences in the photos below. I also tried the Somanian Unlit Transparent and the results are sometimes a bit btter, but still are not good enough.

What I want to accomplish is the Fade effect, would love your help.

Transparent Shader that doesn’t work:

Shader "Somian/Unlit/Transparent" {
 
Properties {
    _Color ("Main Color (A=Opacity)", Color) = (1,1,1,1)
    _MainTex ("Base (A=Opacity)", 2D) = ""
}
 
Category {
    Tags {"Queue"="Transparent" "IgnoreProjector"="True"}
    ZWrite Off
    Blend SrcAlpha OneMinusSrcAlpha
 
    SubShader {Pass {
        GLSLPROGRAM
        varying mediump vec2 uv;
       
        #ifdef VERTEX
        uniform mediump vec4 _MainTex_ST;
        void main() {
            gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
            uv = gl_MultiTexCoord0.xy * _MainTex_ST.xy + _MainTex_ST.zw;
        }
        #endif
       
        #ifdef FRAGMENT
        uniform lowp sampler2D _MainTex;
        uniform lowp vec4 _Color;
        void main() {
            gl_FragColor = texture2D(_MainTex, uv) * _Color;
        }
        #endif     
        ENDGLSL
    }}
   
    SubShader {Pass {
        SetTexture[_MainTex] {Combine texture * constant ConstantColor[_Color]}
    }}
}
 
}

107418-image.png

107421-image-1.png

Solution:

// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)

// Unlit shader. Simplest possible textured shader.
// - no lighting
// - no lightmap support
// - no per-material color

Shader "Unlit/TransparentTexture" {
Properties {
    _MainTex ("Base (RGB)", 2D) = "white" {}
    _Color ("Base Color", Color) = (1,1,1,1)
}

SubShader {
    Tags { "RenderType"="Opaque" "Queue"="Transparent" }
    LOD 100

    Blend SrcAlpha OneMinusSrcAlpha

    Pass {
        CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #pragma target 2.0

            #include "UnityCG.cginc"

            struct appdata_t {
                float4 vertex : POSITION;
                float2 texcoord : TEXCOORD0;
                UNITY_VERTEX_INPUT_INSTANCE_ID
            };

            struct v2f {
                float4 vertex : SV_POSITION;
                float2 texcoord : TEXCOORD0;
                UNITY_VERTEX_OUTPUT_STEREO
            };

            sampler2D _MainTex;
            float4 _MainTex_ST;

            float4 _Color;

            v2f vert (appdata_t v)
            {
                v2f o;
                UNITY_SETUP_INSTANCE_ID(v);
                UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
                o.vertex = UnityObjectToClipPos(v.vertex);
                o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
                UNITY_TRANSFER_FOG(o,o.vertex);
                return o;
            }

            fixed4 frag (v2f i) : SV_Target
            {
                fixed4 col = tex2D(_MainTex, i.texcoord);
                col *= _Color;
                UNITY_APPLY_FOG(i.fogCoord, col);
                // UNITY_OPAQUE_ALPHA(col.a);
                return col;
            }
        ENDCG
    }
}

}