forked from microsoft/MixedRealityToolkit-Unity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StereoImage.shader
51 lines (43 loc) · 1 KB
/
StereoImage.shader
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
Shader "Analog/TransparentUnlit"
{
Properties
{
_MainTex ("Alpha", 2D) = "white" {}
_Opacity("Opacity", Range(0.0, 1.0)) = 1.0
_Color("Color", Color ) = (0.3,0.3, 0.7, 1.0)
_Brightness("Brightness", Range(0.0,16.0)) = 1.0
}
SubShader
{
ZWrite Off
Cull Off
Blend SrcAlpha OneMinusSrcAlpha
Tags { "Queue" = "Transparent" }
LOD 200
CGPROGRAM
#pragma surface surf Unlit alpha
sampler2D _MainTex;
float _Opacity;
float3 _Color;
float _Brightness;
half4 LightingUnlit(SurfaceOutput s, half3 lightDir, half atten)
{
fixed4 c = fixed4(0.0,0.0,0.0, s.Alpha);
return c;
}
struct Input
{
float2 uv_MainTex;
};
void surf(Input IN, inout SurfaceOutput o)
{
fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb * _Color * _Brightness;
o.Alpha = c.a *_Opacity;
}
ENDCG
}
FallBack "Diffuse"
}