mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
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:
1 parent
0b42d0b6e7
commit
c58a0cd307
1 file changed
+1
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user