mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Reorganize UI shaders
This commit is contained in:
parent
f1115ef188
commit
321b2a49a4
@ -4,11 +4,11 @@ Shader "ConformalDecals/UI/Color Slider"
|
|||||||
{
|
{
|
||||||
_Color("Color", Color) = (0,0,0,0)
|
_Color("Color", Color) = (0,0,0,0)
|
||||||
_Radius("Radius", Float) = 4
|
_Radius("Radius", Float) = 4
|
||||||
|
|
||||||
_OutlineGradient("Outline Gradient Step", Range (0, 1)) = 0.6
|
_OutlineGradient("Outline Gradient Step", Range (0, 1)) = 0.6
|
||||||
_OutlineOpacity("Outline Opacity", Range (0, 0.5)) = 0.1
|
_OutlineOpacity("Outline Opacity", Range (0, 0.5)) = 0.1
|
||||||
_OutlineWidth("Outline Width", Float) = 3
|
_OutlineWidth("Outline Width", Float) = 3
|
||||||
|
|
||||||
_StencilComp ("Stencil Comparison", Float) = 8
|
_StencilComp ("Stencil Comparison", Float) = 8
|
||||||
_Stencil ("Stencil ID", Float) = 0
|
_Stencil ("Stencil ID", Float) = 0
|
||||||
_StencilOp ("Stencil Operation", Float) = 0
|
_StencilOp ("Stencil Operation", Float) = 0
|
||||||
@ -18,13 +18,11 @@ Shader "ConformalDecals/UI/Color Slider"
|
|||||||
_ColorMask ("Color Mask", Float) = 15
|
_ColorMask ("Color Mask", Float) = 15
|
||||||
|
|
||||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||||
|
|
||||||
[Toggle(HUE)] _Hue ("Hue", int) = 0
|
[Toggle(HUE)] _Hue ("Hue", int) = 0
|
||||||
[Toggle(RED)] _Red ("Red", int) = 0
|
[Toggle(RED)] _Red ("Red", int) = 0
|
||||||
[Toggle(GREEN)] _Green ("Green", int) = 0
|
[Toggle(GREEN)] _Green ("Green", int) = 0
|
||||||
[Toggle(BLUE)] _Blue ("Blue", int) = 0
|
[Toggle(BLUE)] _Blue ("Blue", int) = 0
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
SubShader
|
SubShader
|
||||||
{
|
{
|
||||||
@ -44,14 +42,14 @@ Shader "ConformalDecals/UI/Color Slider"
|
|||||||
ReadMask [_StencilReadMask]
|
ReadMask [_StencilReadMask]
|
||||||
WriteMask [_StencilWriteMask]
|
WriteMask [_StencilWriteMask]
|
||||||
}
|
}
|
||||||
|
|
||||||
Cull Off
|
Cull Off
|
||||||
Lighting Off
|
Lighting Off
|
||||||
ZWrite Off
|
ZWrite Off
|
||||||
ZTest [unity_GUIZTestMode]
|
ZTest [unity_GUIZTestMode]
|
||||||
Blend SrcAlpha OneMinusSrcAlpha
|
Blend SrcAlpha OneMinusSrcAlpha
|
||||||
ColorMask [_ColorMask]
|
ColorMask [_ColorMask]
|
||||||
|
|
||||||
Pass
|
Pass
|
||||||
{
|
{
|
||||||
CGPROGRAM
|
CGPROGRAM
|
||||||
@ -63,7 +61,7 @@ Shader "ConformalDecals/UI/Color Slider"
|
|||||||
#include "UnityCG.cginc"
|
#include "UnityCG.cginc"
|
||||||
#include "UnityUI.cginc"
|
#include "UnityUI.cginc"
|
||||||
#include "HSL.cginc"
|
#include "HSL.cginc"
|
||||||
#include "SDF.cginc"
|
#include "../SDF.cginc"
|
||||||
|
|
||||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
@ -8,7 +8,7 @@ Shader "ConformalDecals/UI/HSV Square"
|
|||||||
_OutlineGradient("Outline Gradient Step", Range (0, 1)) = 0.6
|
_OutlineGradient("Outline Gradient Step", Range (0, 1)) = 0.6
|
||||||
_OutlineOpacity("Outline Opacity", Range (0, 0.5)) = 0.1
|
_OutlineOpacity("Outline Opacity", Range (0, 0.5)) = 0.1
|
||||||
_OutlineWidth("Outline Width", Float) = 3
|
_OutlineWidth("Outline Width", Float) = 3
|
||||||
|
|
||||||
_StencilComp ("Stencil Comparison", Float) = 8
|
_StencilComp ("Stencil Comparison", Float) = 8
|
||||||
_Stencil ("Stencil ID", Float) = 0
|
_Stencil ("Stencil ID", Float) = 0
|
||||||
_StencilOp ("Stencil Operation", Float) = 0
|
_StencilOp ("Stencil Operation", Float) = 0
|
||||||
@ -37,14 +37,14 @@ Shader "ConformalDecals/UI/HSV Square"
|
|||||||
ReadMask [_StencilReadMask]
|
ReadMask [_StencilReadMask]
|
||||||
WriteMask [_StencilWriteMask]
|
WriteMask [_StencilWriteMask]
|
||||||
}
|
}
|
||||||
|
|
||||||
Cull Off
|
Cull Off
|
||||||
Lighting Off
|
Lighting Off
|
||||||
ZWrite Off
|
ZWrite Off
|
||||||
ZTest [unity_GUIZTestMode]
|
ZTest [unity_GUIZTestMode]
|
||||||
Blend SrcAlpha OneMinusSrcAlpha
|
Blend SrcAlpha OneMinusSrcAlpha
|
||||||
ColorMask [_ColorMask]
|
ColorMask [_ColorMask]
|
||||||
|
|
||||||
Pass
|
Pass
|
||||||
{
|
{
|
||||||
CGPROGRAM
|
CGPROGRAM
|
||||||
@ -56,7 +56,7 @@ Shader "ConformalDecals/UI/HSV Square"
|
|||||||
#include "UnityCG.cginc"
|
#include "UnityCG.cginc"
|
||||||
#include "UnityUI.cginc"
|
#include "UnityUI.cginc"
|
||||||
#include "HSL.cginc"
|
#include "HSL.cginc"
|
||||||
#include "SDF.cginc"
|
#include "../SDF.cginc"
|
||||||
|
|
||||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
@ -4,11 +4,11 @@ Shader "ConformalDecals/UI/Color Swatch"
|
|||||||
{
|
{
|
||||||
_Color("Color", Color) = (0,0,0,0)
|
_Color("Color", Color) = (0,0,0,0)
|
||||||
_Radius("Radius", Float) = 4
|
_Radius("Radius", Float) = 4
|
||||||
|
|
||||||
_OutlineGradient("Outline Gradient Step", Range (0, 1)) = 0.6
|
_OutlineGradient("Outline Gradient Step", Range (0, 1)) = 0.6
|
||||||
_OutlineOpacity("Outline Opacity", Range (0, 0.5)) = 0.1
|
_OutlineOpacity("Outline Opacity", Range (0, 0.5)) = 0.1
|
||||||
_OutlineWidth("Outline Width", Float) = 3
|
_OutlineWidth("Outline Width", Float) = 3
|
||||||
|
|
||||||
_StencilComp ("Stencil Comparison", Float) = 8
|
_StencilComp ("Stencil Comparison", Float) = 8
|
||||||
_Stencil ("Stencil ID", Float) = 0
|
_Stencil ("Stencil ID", Float) = 0
|
||||||
_StencilOp ("Stencil Operation", Float) = 0
|
_StencilOp ("Stencil Operation", Float) = 0
|
||||||
@ -37,14 +37,14 @@ Shader "ConformalDecals/UI/Color Swatch"
|
|||||||
ReadMask [_StencilReadMask]
|
ReadMask [_StencilReadMask]
|
||||||
WriteMask [_StencilWriteMask]
|
WriteMask [_StencilWriteMask]
|
||||||
}
|
}
|
||||||
|
|
||||||
Cull Off
|
Cull Off
|
||||||
Lighting Off
|
Lighting Off
|
||||||
ZWrite Off
|
ZWrite Off
|
||||||
ZTest [unity_GUIZTestMode]
|
ZTest [unity_GUIZTestMode]
|
||||||
Blend SrcAlpha OneMinusSrcAlpha
|
Blend SrcAlpha OneMinusSrcAlpha
|
||||||
ColorMask [_ColorMask]
|
ColorMask [_ColorMask]
|
||||||
|
|
||||||
Pass
|
Pass
|
||||||
{
|
{
|
||||||
CGPROGRAM
|
CGPROGRAM
|
||||||
@ -56,7 +56,7 @@ Shader "ConformalDecals/UI/Color Swatch"
|
|||||||
#include "UnityCG.cginc"
|
#include "UnityCG.cginc"
|
||||||
#include "UnityUI.cginc"
|
#include "UnityUI.cginc"
|
||||||
#include "HSL.cginc"
|
#include "HSL.cginc"
|
||||||
#include "SDF.cginc"
|
#include "../SDF.cginc"
|
||||||
|
|
||||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
Loading…
Reference in New Issue
Block a user