Implement playable Mac client and rendering validation

This commit is contained in:
shen
2026-09-11 14:58:22 +08:00
parent 1ab68bd06e
commit 374d4165d8
233 changed files with 6546 additions and 284 deletions
+27
View File
@@ -56,6 +56,33 @@ func run() -> void:
if indices(models[0]).size() != 4:
failures += 1
printerr("FAIL: body and hair surfaces must both be exercised")
# Changes must update the visible mesh immediately, even while animation is paused.
for model in models:
model.set("hair_gr2", "")
if indices(model).size() != 3:
failures += 1
printerr("FAIL: detached hair remains in rendered mesh")
model.set("hair_gr2", base.path_join("hair/hair_2_1.gr2"))
if indices(model).size() != 4:
failures += 1
printerr("FAIL: replacement hair missing")
model.set("hair_skin", base.path_join("warrior_hair_01.dds"))
var mi: MeshInstance3D = model.find_children("*", "MeshInstance3D", true, false)[0]
var hair: ShaderMaterial = mi.get_active_material(3)
var expected: Image = preload("res://ui/ui_assets.gd").load_dds_image(base.path_join("warrior_hair_01.dds"))
var actual: Image = hair.get_shader_parameter("albedo_tex").get_image()
actual.convert(Image.FORMAT_RGBA8)
expected.convert(Image.FORMAT_RGBA8)
actual.clear_mipmaps()
expected.clear_mipmaps()
if actual.get_data() != expected.get_data() or not hair.shader.code.contains("cull_disabled"):
failures += 1
printerr("FAIL: replacement hair texture or two-sided material not applied")
if OS.get_environment("MTGODOT_GPUSKIN") == "1":
var body: ShaderMaterial = mi.get_active_material(0)
if int(body.get_shader_parameter("mode")) != 0:
failures += 1
printerr("FAIL: body incorrectly reclassified as hair")
print("character_winding_test: failures=", failures)
for node in animations + models:
node.queue_free()