the glow ™️

This commit is contained in:
ThePurpleAnon 2024-04-08 02:42:20 -05:00
parent 2400af03b1
commit 40fc63fe25
2 changed files with 9 additions and 9 deletions

View file

@ -23,7 +23,7 @@ Shader "Sprites/AceStarCycle"
Cull Off Cull Off
Lighting Off Lighting Off
ZWrite Off ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha Blend One OneMinusSrcAlpha
Pass Pass
{ {
@ -82,15 +82,15 @@ Shader "Sprites/AceStarCycle"
fixed4 frag(v2f IN) : SV_Target fixed4 frag(v2f IN) : SV_Target
{ {
fixed4 input1 = SampleSpriteTexture (IN.texcoord); fixed4 c = SampleSpriteTexture (IN.texcoord);
float grayscale = (IN.color.r + IN.color.g + IN.color.b) / 3; float grayscale = (IN.color.r + IN.color.g + IN.color.b) / 3;
float grayscaleScrolled = (grayscale + ((_Speed / 4) * _Time.y)) % 1; float grayscaleScrolled = (grayscale + ((_Speed / 4) * _Time.y)) % 1;
fixed4 c = tex2D (_GradientMap, grayscaleScrolled); fixed4 g = tex2D (_GradientMap, grayscaleScrolled);
c.a *= input1.a * IN.color.a;
c = fixed4(g.r, g.g, g.b, c.a);
c.rgb *= c.a * IN.color.a;
c.a *= IN.color.a;
return c; return c;
} }
ENDCG ENDCG

View file

@ -8,7 +8,7 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: AceStarParticle m_Name: AceStarParticle
m_Shader: {fileID: 4800000, guid: dba21054204d8624e8a72499fb6076b2, type: 3} m_Shader: {fileID: 4800000, guid: 49c9ed0b23138ae43854107346543307, type: 3}
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords: []
m_LightmapFlags: 4 m_LightmapFlags: 4
@ -53,7 +53,7 @@ Material:
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _GradientMap: - _GradientMap:
m_Texture: {fileID: 2800000, guid: 5e8d7a42a8188ef42b113cab198f5aaa, type: 3} m_Texture: {fileID: 2800000, guid: 4aa512ca12c0f0645830e3a8aa1745fc, type: 3}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _LeftTex: - _LeftTex:
@ -101,7 +101,7 @@ Material:
- _Parallax: 0.02 - _Parallax: 0.02
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _Speed: 1 - _Speed: 10
- _Speed1: 0 - _Speed1: 0
- _SrcBlend: 1 - _SrcBlend: 1
- _Stencil: 0 - _Stencil: 0