feat(unity): enhance visual effects and animations
- Add cloud system with procedural sprites and parallax movement - Add tree swaying animation for palm trees - Improve agent breathing with squash & stretch animation - Add jump animation routine for agent reactions - Add custom CartoonWater shader support - Add SetupVisuals editor tool and GlobalProfile asset - Lower speech bubble alpha for glass effect 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
81
unity-client/Assets/Shaders/CartoonWater.shader
Normal file
81
unity-client/Assets/Shaders/CartoonWater.shader
Normal file
@@ -0,0 +1,81 @@
|
||||
Shader "TheIsland/CartoonWater"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainColor ("Water Color", Color) = (0.2, 0.5, 0.9, 0.8)
|
||||
_FoamColor ("Foam Color", Color) = (1, 1, 1, 1)
|
||||
_WaveSpeed ("Wave Speed", Range(0, 5)) = 1.0
|
||||
_WaveHeight ("Wave Height", Range(0, 1)) = 0.1
|
||||
_FoamAmount ("Foam Amount", Range(0, 1)) = 0.1
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
|
||||
LOD 100
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZWrite Off
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
float3 worldPos : TEXCOORD1;
|
||||
};
|
||||
|
||||
fixed4 _MainColor;
|
||||
fixed4 _FoamColor;
|
||||
float _WaveSpeed;
|
||||
float _WaveHeight;
|
||||
float _FoamAmount;
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
// Simple vertex displacement wave
|
||||
float wave = sin(_Time.y * _WaveSpeed + v.vertex.x * 2.0) * _WaveHeight;
|
||||
v.vertex.y += wave;
|
||||
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = v.uv;
|
||||
o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
// Moving foam texture simulation using noise
|
||||
float2 uv1 = i.uv + float2(_Time.x * 0.1, _Time.x * 0.05);
|
||||
float noise = frac(sin(dot(uv1, float2(12.9898, 78.233))) * 43758.5453);
|
||||
|
||||
// 1. Horizon/Wave Foam (Top)
|
||||
float waveFoam = step(1.0 - _FoamAmount - (noise * 0.05), i.uv.y);
|
||||
|
||||
// 2. Shoreline Foam (Bottom)
|
||||
// Sine wave for "tide" effect
|
||||
float tide = sin(_Time.y * 1.5) * 0.05;
|
||||
float shoreThreshold = 0.05 + tide + (noise * 0.02);
|
||||
float shoreFoam = step(i.uv.y, shoreThreshold);
|
||||
|
||||
// Combine foam
|
||||
float totalFoam = max(waveFoam, shoreFoam);
|
||||
|
||||
fixed4 col = lerp(_MainColor, _FoamColor, totalFoam);
|
||||
return col;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
9
unity-client/Assets/Shaders/CartoonWater.shader.meta
Normal file
9
unity-client/Assets/Shaders/CartoonWater.shader.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f82a9056a602b4fcd9b86f52d2c43c9a
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user