Skip to content

Instantly share code, notes, and snippets.

@increpare
Created July 22, 2014 17:51
Show Gist options
  • Save increpare/e33e5bb0eff9fb18fcfb to your computer and use it in GitHub Desktop.
Save increpare/e33e5bb0eff9fb18fcfb to your computer and use it in GitHub Desktop.
/*
produce the error
Shader error in 'Custom/UV2Test': declaration of "_MainTex_ST" conflicts with previous declaration at (48) at line 49
*/
Shader "Custom/UV2Test" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Lambert
sampler2D _MainTex;
struct Input {
float2 uv_MainTex;
float2 uv2_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D (_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb;
o.Alpha = c.a;
o.Emission = float3(IN.uv2_MainTex.x,IN.uv2_MainTex.y,0);
}
ENDCG
}
FallBack "Diffuse"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment