Clue monitor looks much fancier and more authentic to the original design.
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
|
||||
|
||||
// Simplified Diffuse shader. Differences from regular Diffuse one:
|
||||
// - no Main Color
|
||||
// - fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH.
|
||||
|
||||
Shader "Carmen/UVGlow"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
|
||||
Pass {
|
||||
Cull Off
|
||||
|
||||
CGPROGRAM
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
uniform float4 _Emission;
|
||||
CBUFFER_END
|
||||
|
||||
struct Data
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct V2F
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 position : SV_POSITION;
|
||||
};
|
||||
|
||||
|
||||
float3 Hue(float H)
|
||||
{
|
||||
return saturate(
|
||||
float3(abs(H * 6 - 3) - 1,
|
||||
2 - abs(H * 6 - 2),
|
||||
2 - abs(H * 6 - 4)));
|
||||
}
|
||||
|
||||
float4 HSVtoRGB(in float3 HSV)
|
||||
{
|
||||
return float4(((Hue(HSV.x) - 1) * HSV.y + 1) * HSV.z, 1);
|
||||
}
|
||||
|
||||
|
||||
V2F vert(Data v)
|
||||
{
|
||||
V2F o;
|
||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||
o.position = UnityObjectToClipPos(v.vertex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag(V2F i) : SV_TARGET
|
||||
{
|
||||
return HSVtoRGB(float3(i.uv.x, 1.0, 1.0)) * (i.uv.y * 100.0);
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
FallBack "VRChat/Mobile/Standard Lite"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68bb4901ce4fd904ba3b7c99b826e57d
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user