Initial Commit

This commit is contained in:
Toomas Tamm
2020-11-28 16:54:41 +02:00
parent 97292ee26e
commit ea967135f2
4217 changed files with 2945663 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
Shader "OVRColorRampAlpa" {
Properties {
_Color ("Main Color", Color ) = (1,1,1,1)
_MainTex ("Diffuse (RGB) AlphaMask (A)", 2D) = "white" {}
_ColorRamp ("Color Ramp (A)", 2D) = "white" {}
_ColorRampOffset ("Color Ramp Offset", Range(0,1)) = 0.0
}
Category {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
Blend SrcAlpha OneMinusSrcAlpha
AlphaTest Greater .01
ColorMask RGB
Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
SubShader {
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
sampler2D _ColorRamp;
float _ColorRampOffset;
fixed4 _Color;
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f {
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
float4 _MainTex_ST;
v2f vert(appdata_t v) {
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
return o;
}
fixed4 frag(v2f i) : SV_Target {
float4 texel = tex2D(_MainTex, i.texcoord);
float2 colorIndex = float2( texel.x, _ColorRampOffset );
float4 outColor = tex2D(_ColorRamp, colorIndex) * _Color;
outColor.a = texel.a;
return outColor;
}
ENDCG
}
}
}
} // Category

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b95caf64e2cc3614892026a94bb2be84
timeCreated: 1433268462
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,67 @@
Shader "Oculus/OVRVignette"
{
Properties
{
_Color("Color", Color) = (0,0,0,0)
[Enum(UnityEngine.Rendering.BlendMode)]_BlendSrc ("Blend Source", Float) = 1
[Enum(UnityEngine.Rendering.BlendMode)]_BlendDst ("Blend Destination", Float) = 0
_ZWrite ("Z Write", Float) = 0
}
SubShader
{
Tags { "IgnoreProjector" = "True" }
Pass
{
Blend [_BlendSrc] [_BlendDst]
ZTest Always
ZWrite [_ZWrite]
Cull Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile _ QUADRATIC_FALLOFF
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f
{
float4 vertex : SV_POSITION;
half4 color : COLOR;
};
float4 _ScaleAndOffset0[2];
float4 _ScaleAndOffset1[2];
float4 _Color;
v2f vert (appdata v)
{
v2f o;
float4 scaleAndOffset = lerp(_ScaleAndOffset0[unity_StereoEyeIndex], _ScaleAndOffset1[unity_StereoEyeIndex], v.uv.x);
o.vertex = float4(scaleAndOffset.zw + v.vertex.xy * scaleAndOffset.xy, _ProjectionParams.y, 1);
o.color.rgb = _Color.rgb;
o.color.a = v.uv.y;
return o;
}
fixed4 frag (v2f i) : SV_Target
{
#if QUADRATIC_FALLOFF
i.color.a *= i.color.a;
#endif
return i.color;
}
ENDCG
}
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9d034fa3f535a1648b5059e6907c647d
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,79 @@
// Unlit alpha-blended shader.
// - no lighting
// - no lightmap support
// - supports tint color
Shader "Unlit/Crosshair" {
Properties
{
_MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {}
_Color ("Main Color", Color) = (0.5,0.5,0.5,0.5)
}
SubShader
{
LOD 100
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
}
Cull Off
Lighting Off
ZTest Always
ZWrite Off
Fog { Mode Off }
Offset -1, -1
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata_t
{
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
fixed4 color : COLOR;
};
struct v2f
{
float4 vertex : SV_POSITION;
half2 texcoord : TEXCOORD0;
fixed4 color : COLOR;
};
sampler2D _MainTex;
float4 _MainTex_ST;
fixed4 _Color;
v2f vert (appdata_t v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
o.color = v.color;
return o;
}
fixed4 frag (v2f i) : COLOR
{
fixed4 col = tex2D(_MainTex, i.texcoord) * i.color * _Color * 2.0;
return col;
}
ENDCG
}
}
}

View File

@@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 05b53b473302943b58b8e33c93a38dac
ShaderImporter:
defaultTextures: []
userData: