// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
///
/// Note, this shader is generated from a tool and is not formated for user readability.
///
Shader "ShadowSDK/FingerTipCursor" {
Properties {
[Header(Proximity)]
_Proximity_Distance_("Proximity Distance", Range(0,1)) = 0.05
_Fade_Near_Distance_("Fade Near Distance", Range(0,1)) = 0.1
_Fade_Far_Distance_("Fade Far Distance", Range(0,1)) = 0.2
_Shrink_Start_Distance_("Shrink Start Distance", Range(0,1)) = 0.1
[Header(Shape)]
_Near_Radius_Fraction_("Near Radius Fraction", Range(0,1)) = 0.5
_Far_Center_Fraction_("Far Center Fraction", Range(0,1)) = 1
_Near_Center_Fraction_("Near Center Fraction", Range(0,1)) = 0
_Thickness_("Thickness", Range(0,1)) = 1
[Header(Smooth Pulse)]
_Rise_Start_("Rise Start", Range(0,1)) = 0
_Rise_End_("Rise End", Range(0,1)) = 0.3
_Fall_Start_("Fall Start", Range(0,1)) = 0.77
_Fall_End_("Fall End", Range(0,1)) = 1
_Start_Fall_Fade_("Start Fall Fade", Range(0,1)) = 0.05
[Header(Colors)]
_Edge_Color_("Edge Color", Color) = (0.188235,0.188235,0.188235,0.502)
_Base_Color_("Base Color", Color) = (0.6,0.6,0.6,0.698)
}
SubShader {
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent"}
Blend One OneMinusSrcAlpha
LOD 100
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_instancing
#pragma target 4.0
#include "UnityCG.cginc"
float _Near_Radius_Fraction_;
float _Far_Center_Fraction_;
float _Near_Center_Fraction_;
float _Thickness_;
half _Rise_Start_;
half _Rise_End_;
half _Fall_Start_;
half _Fall_End_;
float _Start_Fall_Fade_;
half4 _Edge_Color_;
half4 _Base_Color_;
bool _Right_Hand_;
bool _Use_Local_Proximity_;
float _Proximity_Distance_;
float _Fade_Near_Distance_;
float _Fade_Far_Distance_;
float _Shrink_Start_Distance_;
struct VertexInput {
float4 vertex : POSITION;
float2 uv0 : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct VertexOutput {
float4 pos : SV_POSITION;
half4 normalWorld : TEXCOORD5;
UNITY_VERTEX_OUTPUT_STEREO
};
// declare parm vars here
//BLOCK_BEGIN Object_To_World_Pos 207
void Object_To_World_Pos_B207(
float3 Pos_Object,
out float3 Pos_World )
{
Pos_World=(mul(unity_ObjectToWorld, float4(Pos_Object, 1)));
}
//BLOCK_END Object_To_World_Pos
//BLOCK_BEGIN Resize 220
void Resize_B220(
float Distance,
float Shrink_Start_Distance,
float Far_Center_Fraction,
float Near_Center_Fraction,
float Near_Radius_Fraction,
float3 Position,
float2 UV,
float Thickness,
float Fade_Near,
float Fade_Far,
float Start_Fall_Fade,
out float Center_Fraction,
out float Radius_At_D,
out float3 New_Position,
out float Outer_Ring,
out float Rim,
out float Fade,
out float Inner_Fade )
{
float k = saturate(Distance/Shrink_Start_Distance);
Center_Fraction = lerp(Near_Center_Fraction, Far_Center_Fraction, k);
Radius_At_D = lerp(Near_Radius_Fraction, 1.0, k);
//Outer_Ring = length(Position.xy)