// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' // Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) // Simplified Diffuse shader. Differences from regular Diffuse one: // - no Main Color // - fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH. Shader "Carmen/Decal" { Properties { _MainTex ("Decal", 2D) = "white" {} _Colour ("Colour", Color) = (1.0, 1.0, 1.0, 1.0) } SubShader { Tags { "Queue"="Transparent" "RenderType"="Transparent" "CanUseSpriteAtlas"="True" } LOD 200 Cull Back Blend SrcAlpha OneMinusSrcAlpha Offset -1, -1 CGPROGRAM #include "UnityCG.cginc" #pragma target 4.5 #pragma surface surf Standard UNITY_DECLARE_TEX2D(_MainTex); struct Input { float2 uv_MainTex; }; half4 _Colour; void surf (Input IN, inout SurfaceOutputStandard o) { half4 TexSample = UNITY_SAMPLE_TEX2D(_MainTex, IN.uv_MainTex); o.Albedo = TexSample.rgb * _Colour; o.Alpha = TexSample.a; } ENDCG } FallBack "Diffuse" }