Refactor depth surface handling and unify depth sampling rules
- Removed the `always_vertex` parameter from `build_surface_camera` to streamline depth sampling for cutouts and ensure consistent behavior across depth plane and panorama. - Updated depth sampling logic to ensure that all free boundary points, including the original frame of the depth plane, use neighboring face depth instead of their own texture sampling. - Adjusted the depth mask deletion process to operate on faces rather than points, eliminating the need for additional cleanup of dangling edges. - Ensured that the cutout rules are consistently applied across all relevant nodes, removing exceptions and simplifying the logic. - Updated tests to verify the new behavior, ensuring that cutout points follow the depth of adjacent faces and that the original frame maintains its depth sampling. - Refactored geometry handling in multiple depth-related nodes to improve clarity and maintainability.
This commit is contained in:
@@ -215,7 +215,8 @@ def test_depth_cutout_reuses_boundary_and_slow_field_nodes():
|
||||
group = build_image_depth_cutout_group()
|
||||
counts = Counter(node.bl_idname for node in group.nodes)
|
||||
assert counts["GeometryNodeInputMeshEdgeNeighbors"] <= 15
|
||||
assert counts["GeometryNodeBlurAttribute"] <= 12
|
||||
# 内部平滑、边界条带与 pin sharp 的法线相干度各一个 Blur。
|
||||
assert counts["GeometryNodeBlurAttribute"] <= 13
|
||||
|
||||
|
||||
def test_center_derives_from_shared_slow_fields():
|
||||
|
||||
Reference in New Issue
Block a user