diff --git a/src/game/engine/scenes/tests/gameplay_arc_proof.gd b/src/game/engine/scenes/tests/gameplay_arc_proof.gd index 5530d6d4..24eb5574 100644 --- a/src/game/engine/scenes/tests/gameplay_arc_proof.gd +++ b/src/game/engine/scenes/tests/gameplay_arc_proof.gd @@ -223,18 +223,15 @@ func _ready() -> void: func _capture_step(label: String, mode: String, focus: Vector2i = Vector2i.ZERO) -> void: - _sync_renderers() if mode == "focus": _focus_camera(focus, 5.0 * 384.0) else: _setup_camera_fit() - # Wait two real frames-rendered to flush the GPU composite. process_frame - # fires before draw; frame_post_draw fires AFTER GPU composite, which is - # what `get_viewport().get_texture()` actually reads. - for _i: int in range(3): - await get_tree().process_frame - for _j: int in range(2): - await RenderingServer.frame_post_draw + _sync_renderers() + # Wall-clock wait so every queued canvas redraw and the camera transform + # both flush through the GPU composite before we read the texture. + # process_frame fires BEFORE draw; only a real timer hands the GPU time. + await get_tree().create_timer(0.5).timeout var image: Image = get_viewport().get_texture().get_image() if image == null: push_error("gameplay_arc: viewport image null at %s" % label)