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>
@@ -0,0 +1,14 @@
|
||||
shader_type spatial;
|
||||
render_mode unshaded, cull_front;
|
||||
|
||||
uniform vec4 outline_color : source_color = vec4(0.1, 0.1, 0.15, 1.0);
|
||||
uniform float outline_width : hint_range(0.0, 0.1) = 0.03;
|
||||
|
||||
void vertex() {
|
||||
// Inverted hull outline: push vertices along normals, render back faces only
|
||||
VERTEX += NORMAL * outline_width;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
ALBEDO = outline_color.rgb;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
shader_type spatial;
|
||||
render_mode unshaded, cull_disabled;
|
||||
|
||||
// Original Trellis atlas texture
|
||||
uniform sampler2D albedo_tex : source_color;
|
||||
// Recolor mask: white = replaceable, black = keep original
|
||||
uniform sampler2D recolor_mask : hint_default_black;
|
||||
// Runtime tint color set by game code
|
||||
uniform vec4 tint_color : source_color = vec4(0.8, 0.8, 0.8, 1.0);
|
||||
// Subtle darkening on shadow side (0.0 = no shadow, 1.0 = full black)
|
||||
uniform float shadow_strength : hint_range(0.0, 1.0) = 0.15;
|
||||
uniform float shadow_threshold : hint_range(0.0, 1.0) = 0.3;
|
||||
|
||||
void fragment() {
|
||||
vec4 original = texture(albedo_tex, UV);
|
||||
float mask = texture(recolor_mask, UV).r;
|
||||
|
||||
// Recolor: blend tint with original, preserving luminance in masked regions
|
||||
// This keeps texture detail (shadows, edges, highlights) while changing the hue
|
||||
float luma = dot(original.rgb, vec3(0.299, 0.587, 0.114));
|
||||
vec3 tinted = tint_color.rgb * (luma * 1.5 + 0.2); // scale luma to avoid too-dark
|
||||
vec3 base = mix(original.rgb, tinted, mask);
|
||||
|
||||
// Gentle toon shadow — just a subtle darkening, not a color replacement
|
||||
vec3 light_dir = normalize(vec3(0.3, -1.0, 0.5));
|
||||
float ndl = dot(NORMAL, -light_dir);
|
||||
float toon = smoothstep(shadow_threshold - 0.1, shadow_threshold + 0.1, ndl);
|
||||
vec3 color = base * mix(1.0 - shadow_strength, 1.0, toon);
|
||||
|
||||
ALBEDO = color;
|
||||
}
|
||||
|
After Width: | Height: | Size: 624 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 841 KiB |
|
After Width: | Height: | Size: 962 KiB |
|
After Width: | Height: | Size: 936 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 437 KiB |
|
After Width: | Height: | Size: 475 KiB |
@@ -152,6 +152,10 @@ quickload={
|
||||
]
|
||||
}
|
||||
|
||||
[gltf]
|
||||
|
||||
embedded_image_handling=3
|
||||
|
||||
[rendering]
|
||||
|
||||
renderer/rendering_method="gl_compatibility"
|
||||
|
||||