Vulkan: give the default material's clip plane the model matrix (#7935)

The default-material shader transforms each vertex by the model matrix
before testing it against the clip plane. Vulkan always passed the
identity, so a clip plane given in world space (for example the warp
plane on a squad logo) was tested against model-space positions. OpenGL
passes gr_model_matrix_stack.get_transform(); do the same here.

Co-authored-by: Dustinspace217 <[email protected]>
This commit is contained in:
dustinspace217andDustinspace217 authored and GitHub committed 2026-11-04 18:18:59 +01:00
1 parent 0b42d0b6e7
commit c58a0cd307
1 file changed
+1 -2
+1 -2
View File
@@ -98,8 +98,7 @@ void vulkan_set_default_material_uniforms(material* material_info)
(clip_plane.normal.xyz.y * clip_plane.position.xyz.y) +
(clip_plane.normal.xyz.z * clip_plane.position.xyz.z));
// Model matrix (identity for now, material doesn't provide one)
vm_matrix4_set_identity(&data->modelMatrix);
data->modelMatrix = gr_model_matrix_stack.get_transform();
} else {
data->clipEnabled = 0;
vm_matrix4_set_identity(&data->modelMatrix);