2V2-e.3: live smoke of the Godot render adapter

Fix the material cache key: bools given to %d failed to format, so every
draw shared the first material (the face texture). The render test now
checks one texture per texture name. Offline and live (192.168.21.203)
show the dressed main character; live also shows the nearby mobs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 20:42:24 +09:00
co-authored by Claude Opus 5.5
parent 1fe8a4b643
commit ac4c2aa4e0
4 changed files with 11 additions and 3 deletions
+3 -2
View File
@@ -171,8 +171,9 @@ func _build_mesh(draw: Dictionary) -> ArrayMesh:
func _material(draw: Dictionary) -> StandardMaterial3D:
var lit: bool = draw["lighting"] and not _environment_missing(draw)
var key := "%s|%d|%d|%d|%d|%d|%d|%d|%s|%s" % [draw["texture0"], draw["alpha_blend"], draw["src_blend"],
draw["dest_blend"], draw["alpha_test"], draw["alpha_ref"], draw["cull_mode"], lit,
# alpha_blend / alpha_test / lit are bools: %d needs them as ints.
var key := "%s|%d|%d|%d|%d|%d|%d|%d|%s|%s" % [draw["texture0"], int(draw["alpha_blend"]), draw["src_blend"],
draw["dest_blend"], int(draw["alpha_test"]), draw["alpha_ref"], draw["cull_mode"], int(lit),
draw["material_diffuse"], draw["material_emissive"]]
if _materials.has(key):
return _materials[key]