Mercurial > hg > Game > Games
diff Orchestland/Assets/LeapMotion/Widgets/Shaders/SelfIllumAlpha.shader @ 1:f7675884f2a1
Add Orchestland project
author | Daiki OYAKAWA <e135764@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Jul 2015 23:09:20 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Orchestland/Assets/LeapMotion/Widgets/Shaders/SelfIllumAlpha.shader Fri Jul 17 23:09:20 2015 +0900 @@ -0,0 +1,48 @@ +Shader "SelfIllumAlpha" { +Properties { + _Color ("Main Color", Color) = (1,1,1,1) + _MainTex ("Texture", 2D) = "white" { } +} +SubShader { + Tags { "Queue" = "Transparent" } + Pass { + + + Cull Back + Blend SrcAlpha OneMinusSrcAlpha + + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + float4 _Color; + sampler2D _MainTex; + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + float4 _MainTex_ST; + + v2f vert (appdata_base v) + { + v2f o; + o.pos = mul (UNITY_MATRIX_MVP, v.vertex); + o.uv = TRANSFORM_TEX (v.texcoord, _MainTex); + return o; + } + + half4 frag (v2f i) : COLOR + { + half4 texcol = tex2D (_MainTex, i.uv); + return texcol * _Color; + } + ENDCG + } +} +Fallback off +} \ No newline at end of file