Files
settled-reach/client/assets/characters/shaders/toon.gdshader
T
jpmschweitzerandClaude Opus 4.6 ff3a8e95e4 feat(client): port character shaders, skin tones, skeleton, and animations (#702, #706)
Port proven shaders (toon, toon_masked, outline) and skin tone textures
from quaternius-aesthetic spike to production client. Import 65-bone
armature and Universal Animation Libraries (UAL1 + UAL2). Set
gltf/embedded_image_handling=3 in project.godot (critical import setting).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 07:48:37 +01:00

17 lines
571 B
Plaintext

shader_type spatial;
render_mode unshaded;
uniform vec4 base_color : source_color = vec4(0.8, 0.6, 0.4, 1.0);
uniform vec4 shadow_color : source_color = vec4(0.4, 0.3, 0.2, 1.0);
uniform float shadow_threshold : hint_range(0.0, 1.0) = 0.5;
void fragment() {
// Simple toon shading: use normal dot light to pick between base and shadow
vec3 light_dir = normalize(vec3(0.3, -1.0, 0.5));
float ndl = dot(NORMAL, -light_dir);
float toon = step(shadow_threshold, ndl);
vec3 color = mix(shadow_color.rgb, base_color.rgb, toon);
ALBEDO = color;
ALPHA = base_color.a;
}