Billboard shader works in scene view but not game view

I’m trying to write a simple billboard shader for application on quads. It appears to be functioning as expected in the scene view, but the camera in the game view is completely wrong (objects clipping in and out of existence, not rotating with the viewpoint, etc.). The code for my shader is below, any help is much appreciated.

Shader "Custom/BillboardShader"
{
   Properties{
      _MainTex("Texture Image", 2D) = "white" {}
      _ScaleX("Scale X", Float) = 1.0
      _ScaleY("Scale Y", Float) = 1.0
   }
      SubShader{
         Tags{"Queue" = "Transparent" "RenderType" = "Transparent" }
         Pass{
         CGPROGRAM
         #include "UnityCG.cginc"
         #pragma vertex vert  
         #pragma fragment frag

         uniform sampler2D _MainTex;
         uniform float _ScaleX;
         uniform float _ScaleY;

         struct vertexInput {
            float4 vertex : POSITION;
            float4 tex : TEXCOORD0;
         };

         struct vertexOutput {
            float4 pos : POSITION;
            float4 tex : TEXCOORD0;
         };

         vertexOutput vert(vertexInput input)
         {
            vertexOutput output;

            output.pos = mul(UNITY_MATRIX_P,
               mul(UNITY_MATRIX_MV, float4(0,0,0,1))
               + float4(input.vertex.xyz, 0));

            output.tex = input.tex;

            return output;
         }

         float4 frag(vertexOutput input) : COLOR
         {
            return tex2D(_MainTex, float2(input.tex.xy));
         }

         ENDCG
      }
   }
}

Strange… Shader seems to work perfectly fine for me. Are you sure you have the shader assigned to the material for these objects that are misbehaving?

In any case, maybe this fantastic billboard shader pack can be of some help?

Adding a new Tag “DisableBatching”=“True” fixed issue.

I had the same issue after upgrading to Universal Render Pipeline from inbuilt. After pressing lots of buttons I found ** enabling “Use Post Processing” in the Camera Component** solved the issue. The problem shader uses lots of in-built variables and screen space calculations, maybe post-processing updates these or something.