comparison Orchestland/Assets/LeapMotion/Resources/PassthroughBackground.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
comparison
equal deleted inserted replaced
0:347d21cdfc22 1:f7675884f2a1
1 Shader "LeapMotion/Passthrough/Background" {
2 Properties {
3 _ColorSpaceGamma ("Color Space Gamma", Float) = 1.0
4 }
5
6 SubShader {
7 Tags {"Queue"="Background" "IgnoreProjector"="True"}
8
9 Cull Off
10 Zwrite Off
11 Blend One Zero
12
13 Pass{
14 CGPROGRAM
15 #pragma multi_compile LEAP_FORMAT_IR LEAP_FORMAT_RGB
16 #include "LeapCG.cginc"
17 #include "UnityCG.cginc"
18
19 #pragma vertex vert
20 #pragma fragment frag
21
22 uniform float _ColorSpaceGamma;
23
24 struct frag_in{
25 float4 position : SV_POSITION;
26 float4 screenPos : TEXCOORD1;
27 };
28
29 frag_in vert(appdata_img v){
30 frag_in o;
31 o.position = mul(UNITY_MATRIX_MVP, v.vertex);
32 o.screenPos = ComputeScreenPos(o.position);
33 return o;
34 }
35
36 float4 frag (frag_in i) : COLOR {
37 return float4(pow(LeapColor(i.screenPos), 1/_ColorSpaceGamma), 1);
38 }
39
40 ENDCG
41 }
42 }
43 Fallback off
44 }