Shader error in 'SG/SG Reflect': Duplicated input semantics can't change type, size, or layout ('TEX

do you know what that means and how to fix it?

Shader error in 'SG/SG Reflect': Duplicated input semantics can't change type, size, or layout ('TEXCOORD0').

Compiling Fragment program with FOG_EXP2
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

the shader is this

  Shader "SG/SG Reflect" {
    Properties {
    [HDR]        _Color ("Color",Color) = (1,1,1,1)
      _MainTex ("Texture", 2D) = "white" {}
      //_Cube ("Cubemap", CUBE) = "" {}
        _Metallic ("Metallic", RANGE(0,1)) = 0.5
        _Smoothness ("Smoothness", RANGE(0,1)) = 1
      _HealColor ("Heal Color", Color) = (0,1,0,1) 
      _HealPulseVal ("Heal Pulse", RANGE(0,1)) = 0
      _DamageColor ("Damage Color", Color) = (1,0,0,1) 
      _DamagePulseVal ("Damage Pulse", RANGE(0,1)) = 0
     _OutlineColor ("Outline Color", Color) = (0,0,0,1)
    _Outline ("Outline width", float) = .005
        }

    SubShader {
      Tags { "RenderType" = "Opaque" }
      CGPROGRAM

        #pragma surface surf Standard approxview  vertex:vert noforwardadd nodirlightmap
       float4 _Color;
      float4 _RimColor;     
      float _RimPower;
      float _Metallic;
      float _Smoothness;
        uniform float _DamagePulseVal;
      uniform float _HealPulseVal;
      uniform float4 _DamageColor; 
      uniform float4 _HealColor;

      struct Input
      {
          float2 uv_MainTex;
          float3 worldRefl;
          float3 vertexColor;
          float3 viewDir;
      };

      void vert (inout appdata_full v, out Input o)
      {
          UNITY_INITIALIZE_OUTPUT(Input,o);
          o.vertexColor = v.color.rgb;
      }

      sampler2D _MainTex;
      samplerCUBE _Cube;

      void surf (Input IN, inout SurfaceOutputStandard o)
      {
             half3 c = tex2D (_MainTex, IN.uv_MainTex).rgb * IN.vertexColor *2* _Color;         
             c = c*(1-_DamagePulseVal) + _DamagePulseVal*_DamageColor.rgb;       
            c = c*(1-_HealPulseVal) + _HealPulseVal*_HealColor.rgb; 
          c *= IN.vertexColor;
            o.Albedo = c;
          o.Smoothness = _Smoothness;
          o.Metallic = _Metallic;
      }
      ENDCG
     UsePass "Toon/Basic Outline/OUTLINE"
    }

    Fallback "Diffuse"
  }

Did you figure it out? i have the same problem!

Just a wild guess, but maybe check if you are using the same semantic twice. For example SV_Position and POSITION could be the same as well as TEXCOORD_0 and UNITY_FOG_COORDS(0).

1 Like


I fixed it but that was so long ago I don't remember.
Lemme exhume that old project.
Oh I switched to URP and rewrote the shader in SG.
Sorry can't help on this one.