Release 0.9.5 texture and material refinement
This commit is contained in:
1 parent
fb3da52438
commit
4bc6390e9f
28 files changed
+160
-78
No files matched your search
@@ -42,10 +42,19 @@ func _process(delta: float) -> bool:
|
||||
if frame >= WARMUP_FRAMES + SAMPLE_FRAMES:
|
||||
var average := sample_ms / SAMPLE_FRAMES
|
||||
var meshes := 0
|
||||
var triangles := 0
|
||||
for avatar in avatars:
|
||||
meshes += avatar.find_children("*", "MeshInstance3D", true, false).size()
|
||||
print("NPC budget: %d avatars, %d meshes, avg frame %.2f ms (budget %.0f ms)" % [
|
||||
COUNT, meshes, average, BUDGET_MS])
|
||||
for node in avatar.find_children("*", "MeshInstance3D", true, false):
|
||||
var mi := node as MeshInstance3D
|
||||
if mi == null or mi.mesh == null:
|
||||
continue
|
||||
meshes += 1
|
||||
for surface in mi.mesh.get_surface_count():
|
||||
var arrays := mi.mesh.surface_get_arrays(surface)
|
||||
var indices: PackedInt32Array = arrays[Mesh.ARRAY_INDEX]
|
||||
triangles += indices.size() / 3
|
||||
print("NPC budget: %d avatars, %d meshes, %d triangles, avg frame %.2f ms (budget %.0f ms)" % [
|
||||
COUNT, meshes, triangles, average, BUDGET_MS])
|
||||
if average > BUDGET_MS:
|
||||
printerr("SMOKE FAIL: frame time %.1f ms exceeds the %.0f ms budget" % [
|
||||
average, BUDGET_MS])
|
||||
|
||||
Reference in new issue
Block a user