Metal: Implement suppot for clip plane toggling via GPU_clip_distances.

The Metal backend already supports output for the 6 clipping planes via gl_ClipDistances equivalent, however, functionality to toggle clipping plane enablement was missing.

Authored by Apple: Michael Parkin-White

Ref T96261
Depends on D16777

Reviewed By: fclem

Maniphest Tasks: T96261

Differential Revision: https://developer.blender.org/D16813
This commit is contained in:
Jason Fielder
2022-12-20 14:15:52 +01:00
committed by Clément Foucault
parent df1fe18ed7
commit b3464fe152
8 changed files with 113 additions and 12 deletions

View File

@@ -59,7 +59,9 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_material_surface_vert_common)
.additional_info("eevee_legacy_material_empty_base")
.additional_info("draw_resource_id_varying")
.additional_info("eevee_legacy_common_utiltex_lib")
.additional_info("eevee_legacy_closure_eval_surface_lib");
.additional_info("eevee_legacy_closure_eval_surface_lib")
/* Planar reflections assigns to gl_ClipDistance via surface_vert.glsl. */
.define("USE_CLIP_PLANES");
GPU_SHADER_CREATE_INFO(eevee_legacy_material_surface_vert)
.additional_info("eevee_legacy_material_surface_vert_common")