// 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/UVGradient" { Properties { _TopColour ("Top Colour", Color) = (1,1,1,1) _BottomColour ("Bottom Colour", Color) = (0,0,0,1) } SubShader { Tags { "RenderType"="Opaque" } LOD 200 Pass { Cull Back CGPROGRAM #include "UnityCG.cginc" #pragma vertex vert #pragma fragment frag sampler2D _MainTex; float4 _MainTex_ST; fixed4 _TopColour; fixed4 _BottomColour; CBUFFER_START(UnityPerMaterial) uniform float4 _Emission; CBUFFER_END struct Data { float4 vertex : POSITION; float2 uv : TEXCOORD0; fixed4 colour : COLOR0; }; struct V2F { float2 uv : TEXCOORD0; float4 position : SV_POSITION; fixed4 colour : COLOR0; }; V2F vert(Data v) { V2F o; o.uv = TRANSFORM_TEX(v.uv, _MainTex); o.position = UnityObjectToClipPos(v.vertex); o.colour = v.colour; return o; } fixed4 frag(V2F i) : SV_TARGET { return fixed4(lerp(_BottomColour.rgb, _TopColour.rgb, i.uv.y).rgb, 1.0); } ENDCG } } FallBack "VRChat/Mobile/Standard Lite" }