Skip to content

Commit

Permalink
clipping: use actual model-view matrix for applying clipping
Browse files Browse the repository at this point in the history
This now works when using shaders, too.
  • Loading branch information
mardy committed Feb 1, 2025
1 parent a8f7a93 commit 21db8fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/clip.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ static bool setup_tev(u8 tex_map, int plane_index0, int plane_index1)
* than zero ensures that we end up in the right quadrant) */
set_gx_mtx_row(1, planes, 0.0f, 0.0f, 0.0f, 1.0f);
}
guMtxConcat(planes, glparamstate.modelview_matrix, m);

guMtxConcat(planes, *glparamstate.mv_ptr, m);
/* Our texture has coordinates [0,1]x[0,1] and is made of four texels. The
* centre of our texture is (0.5, 0.5), therefore we need to map the zero
* point to that. We do that by translating the texture coordinates by 0.5.
Expand Down

0 comments on commit 21db8fb

Please sign in to comment.