refactor: incorporate Depth Scale into Depth Split criteria for consistent geometry handling

This commit is contained in:
2026-09-17 00:39:45 +08:00
parent c681d51fd1
commit efd117dd9b
19 changed files with 225 additions and 32 deletions

View File

@@ -194,6 +194,21 @@ def test_material_uv_matches_radial_sampling_and_faces_point_inward():
result.to_mesh_clear()
def test_depth_scale_gates_split_selection():
depth = np.ones((64, 128))
depth[:, 64:] = 7
obj, set_value = panorama(depth)
set_value("Depth Scale", 0)
whole = evaluated(obj)
set_value("Depth Split", 1)
flat = evaluated(obj)
# A flat projection keeps the sphere whole, whatever the split strength is.
assert flat[1] == whole[1]
np.testing.assert_allclose(flat[0], whole[0], atol=1e-6)
set_value("Depth Scale", 1)
assert len(evaluated(obj)[0]) > len(flat[0])
def test_split_strength_and_distance_scale_invariance():
depth = np.ones((64, 128))
depth[:, 64:] = 7