fix(client): remove ALPHA output from toon shaders — fixes depth sorting
Writing ALPHA caused Godot to treat all meshes as transparent, breaking per-pixel depth testing. Hair clipped through the head, clothing through the body — all caused by object-level depth sorting instead of z-buffer. Removing ALPHA makes everything opaque with correct depth behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,5 +12,4 @@ void fragment() {
|
||||
float toon = step(shadow_threshold, ndl);
|
||||
vec3 color = mix(shadow_color.rgb, base_color.rgb, toon);
|
||||
ALBEDO = color;
|
||||
ALPHA = base_color.a;
|
||||
}
|
||||
|
||||
@@ -28,5 +28,4 @@ void fragment() {
|
||||
vec3 color = base * mix(1.0 - shadow_strength, 1.0, toon);
|
||||
|
||||
ALBEDO = color;
|
||||
ALPHA = original.a * tint_color.a;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user