summaryrefslogtreecommitdiff
path: root/Assets/Art/Shaders/Effects/RimLight 1.shader
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Art/Shaders/Effects/RimLight 1.shader')
-rw-r--r--Assets/Art/Shaders/Effects/RimLight 1.shader37
1 files changed, 22 insertions, 15 deletions
diff --git a/Assets/Art/Shaders/Effects/RimLight 1.shader b/Assets/Art/Shaders/Effects/RimLight 1.shader
index f3e99007..ff521c4f 100644
--- a/Assets/Art/Shaders/Effects/RimLight 1.shader
+++ b/Assets/Art/Shaders/Effects/RimLight 1.shader
@@ -8,11 +8,11 @@
Shader "ASESampleShaders/RimLight" {
Properties{
_MainTex("Base (RGBA)", 2D) = "white" {}
- _Color1("Hi Color", color) = (1.0,1.0,1.0,1.0)
+ [HDR]_Color1("Hi Color", color) = (1.0,1.0,1.0,1.0)
_Step1("Color Cutoff", range(0.0,2.0)) = 0.5
- _Color2("Lo Color", color) = (1.0,0.95,0.8,1.0)
+ [HDR]_Color2("Lo Color", color) = (1.0,0.95,0.8,1.0)
- _Intensity("Intensity", range(-1,10)) = 1
+ _Intensity("Intensity", range(1,0)) = 1
_MKGlowPower("Emission Power", range(0,10)) = 0
@@ -23,6 +23,8 @@ Shader "ASESampleShaders/RimLight" {
_Albedo("Albedo", 2D) = "white" {}
_CutOff("Alpha CutOff", Float) = 0.5
+
+ _NoiseMap("Noise Map", 2D) = "white"{}
}
SubShader{
@@ -65,6 +67,7 @@ Shader "ASESampleShaders/RimLight" {
half2 texcoord : TEXCOORD0;
fixed4 color : COLOR;
half2 maskcoord : TEXCOORD1;
+ half2 norisecoord : TEXCOORD2;
//fixed4 color : COLOR;
};
@@ -79,6 +82,9 @@ Shader "ASESampleShaders/RimLight" {
sampler2D _Albedo;
float4 _Albedo_ST;
+ sampler2D _NoiseMap;
+ float4 _NoiseMap_ST;
+
float _CutOff;
v2f vert(appdata_t v)
@@ -87,15 +93,12 @@ Shader "ASESampleShaders/RimLight" {
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _Albedo);
o.color = v.color;
-
+ o.norisecoord = TRANSFORM_TEX(v.texcoord, _NoiseMap);
return o;
}
-
sampler2D _MainTex;
-
-
fixed4 frag(v2f i) : SV_Target
{
float alpha = tex2D(_Albedo, i.texcoord).a;
@@ -104,21 +107,25 @@ Shader "ASESampleShaders/RimLight" {
fixed4 col = tex2D(_Albedo, i.texcoord);
- //if (col.r > _Intensity * 0.1f)
- //discard;
+ fixed norise = tex2D(_NoiseMap, i.norisecoord).r;
+
+ if (norise > _Intensity)
+ discard;
float blendV = col.r;
float texA = col.a;
- col = lerp(_Color2,_Color1,smoothstep(0,_Step1,blendV));
+ //col = lerp(_Color2,_Color1,smoothstep(0,_Step1,blendV));
+ col = lerp(_Color2,_Color1, _Intensity);
- col *= _Intensity;
+ //col *= _Intensity;
- col.xyz *= texA;
- col.a *= texA;
- col *= i.color;
+ //col.xyz *= texA;
+ //col.a *= texA;
+ //col *= i.color;
- return fixed4(col.r, col.g, col.b, col.a);
+ //return fixed4(col.r, col.g, col.b, col.a);
+ return col;
}
ENDCG
}