Initial commit: Unity WordConnect project
This commit is contained in:
@ -0,0 +1,64 @@
|
||||
Shader "Photoshop/ColorDodge"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags {"Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent"}
|
||||
ZWrite Off Lighting Off Cull Off Fog { Mode Off } Blend DstColor SrcColor
|
||||
LOD 110
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert_vct
|
||||
#pragma fragment frag_dodge
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
struct vin_vct
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f_vct
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
fixed4 color : COLOR;
|
||||
half2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
v2f_vct vert_vct(vin_vct v)
|
||||
{
|
||||
v2f_vct o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.color = v.color;
|
||||
o.texcoord = v.texcoord;
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 frag_dodge(v2f_vct i) : COLOR
|
||||
{
|
||||
float4 tex = tex2D(_MainTex, i.texcoord);
|
||||
|
||||
float4 final;
|
||||
// Color dodge formula
|
||||
final.rgb = (i.color.rgb == 1.0) ? 1.0 : min(1.0, tex.rgb / (1.0 - i.color.rgb));
|
||||
final.a = i.color.a * tex.a;
|
||||
|
||||
// Keep the lerp function from the original shader for consistency
|
||||
return lerp(float4(0.5f,0.5f,0.5f,0.5f), final, final.a);
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9d2731c684249f88df93ded2e475950
|
||||
timeCreated: 1728314265
|
||||
@ -0,0 +1,118 @@
|
||||
Shader "UI/GlowAura"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_GlowColor ("Glow Color", Color) = (1,1,1,1)
|
||||
_GlowSpeed ("Glow Speed", Float) = 1.0
|
||||
_GlowIntensity ("Glow Intensity", Range(0, 1)) = 0.5
|
||||
_GlowWidth ("Glow Width", Range(0, 0.1)) = 0.05
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
|
||||
fixed4 _GlowColor;
|
||||
float _GlowSpeed;
|
||||
float _GlowIntensity;
|
||||
float _GlowWidth;
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
OUT.worldPosition = IN.vertex;
|
||||
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
|
||||
OUT.texcoord = IN.texcoord;
|
||||
OUT.color = IN.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
sampler2D _MainTex;
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
||||
|
||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||
|
||||
// Calculate distance from edge
|
||||
float2 uvDist = abs(IN.texcoord - 0.5) * 2;
|
||||
float maxDist = max(uvDist.x, uvDist.y);
|
||||
float edge = saturate((1 - maxDist) / _GlowWidth);
|
||||
|
||||
// Calculate glow
|
||||
float glowFactor = sin(_Time.y * _GlowSpeed) * 0.5 + 0.5;
|
||||
fixed4 glowColor = _GlowColor * glowFactor * _GlowIntensity * edge;
|
||||
|
||||
// Blend glow with original color
|
||||
color.rgb = lerp(glowColor.rgb, color.rgb, color.a);
|
||||
color.a = max(color.a, glowColor.a);
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d61482bfb464443ab0b6c5f62ace5646
|
||||
timeCreated: 1727850912
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6aa561bac89f4a44a765fecd4922e52
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
1224
Assets/WordConnectGameToolkit/Materials/Shaders/Outline.shadergraph
Normal file
1224
Assets/WordConnectGameToolkit/Materials/Shaders/Outline.shadergraph
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0154cb8103414b87971fdd053c92416
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
@ -0,0 +1,71 @@
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
//Somehow achieves an effect similar to this:
|
||||
//#define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))
|
||||
|
||||
Shader "Photoshop/Overlay"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags {"Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent"}
|
||||
ZWrite Off Lighting Off Cull Off Fog { Mode Off } Blend DstColor SrcColor
|
||||
LOD 110
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert_vct
|
||||
#pragma fragment frag_mult
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
struct vin_vct
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f_vct
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
fixed4 color : COLOR;
|
||||
half2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
v2f_vct vert_vct(vin_vct v)
|
||||
{
|
||||
v2f_vct o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.color = v.color;
|
||||
o.texcoord = v.texcoord;
|
||||
return o;
|
||||
}
|
||||
|
||||
float4 frag_mult(v2f_vct i) : COLOR
|
||||
{
|
||||
float4 tex = tex2D(_MainTex, i.texcoord);
|
||||
|
||||
float4 final;
|
||||
final.rgb = i.color.rgb * tex.rgb * 2;
|
||||
final.a = i.color.a * tex.a;
|
||||
return lerp(float4(0.5f,0.5f,0.5f,0.5f), final, final.a);
|
||||
|
||||
}
|
||||
|
||||
ENDCG
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f14be9e27227481caf8f620555956cc
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,73 @@
|
||||
Shader "Custom/SpriteHole"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Radius ("Hole Radius", Float) = 0.3
|
||||
_EdgeSharpness ("Edge Sharpness", Float) = 200
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
float2 _HoleCenter;
|
||||
float _Radius;
|
||||
float _EdgeSharpness;
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
OUT.vertex = UnityObjectToClipPos(IN.vertex);
|
||||
OUT.texcoord = TRANSFORM_TEX(IN.texcoord, _MainTex);
|
||||
OUT.color = IN.color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
fixed4 c = tex2D(_MainTex, IN.texcoord) * IN.color;
|
||||
float2 center = float2(0.5, 0.5);
|
||||
float dist = distance(IN.texcoord, center);
|
||||
float circle = saturate((dist - _Radius) * _EdgeSharpness);
|
||||
|
||||
c.a *= circle;
|
||||
|
||||
return c;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a5faaf1a6e741b6b0a41526197554ff
|
||||
timeCreated: 1726806684
|
||||
1549
Assets/WordConnectGameToolkit/Materials/Shaders/Tips.shadergraph
Normal file
1549
Assets/WordConnectGameToolkit/Materials/Shaders/Tips.shadergraph
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58e412082039d4bb492c3aada48379d4
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
Reference in New Issue
Block a user