diff --git a/src/pc/djui/djui_gfx.c b/src/pc/djui/djui_gfx.c index 6bbded3a3..68156c5e1 100644 --- a/src/pc/djui/djui_gfx.c +++ b/src/pc/djui/djui_gfx.c @@ -131,12 +131,11 @@ void djui_gfx_render_texture_tile(const u8* texture, u32 w, u32 h, u32 bitSize, } f32 aspect = tileH ? ((f32)tileW / (f32)tileH) : 1; - bool msaa = configWindow.msaa > 0; // I don't know why adding 1 to all of the UVs seems to fix rendering, but it does... // this should be tested carefully. it definitely fixes some stuff, but what does it break? - f32 offsetX = (font && msaa ? -1024.0f / (f32)w : 0) + 1; - f32 offsetY = (font && msaa ? -1024.0f / (f32)h : 0) + 1; + f32 offsetX = (font ? -1024.0f / (f32)w : 0) + 1; + f32 offsetY = (font ? -1024.0f / (f32)h : 0) + 1; vtx[0] = (Vtx) {{{ 0, -1, 0 }, 0, { ( tileX * 2048.0f) / (f32)w + offsetX, ((tileY + tileH) * 2048.0f) / (f32)h + offsetY }, { 0xff, 0xff, 0xff, 0xff }}}; vtx[2] = (Vtx) {{{ 1 * aspect, 0, 0 }, 0, { ((tileX + tileW) * 2048.0f) / (f32)w + offsetX, ( tileY * 2048.0f) / (f32)h + offsetY }, { 0xff, 0xff, 0xff, 0xff }}}; vtx[1] = (Vtx) {{{ 1 * aspect, -1, 0 }, 0, { ((tileX + tileW) * 2048.0f) / (f32)w + offsetX, ((tileY + tileH) * 2048.0f) / (f32)h + offsetY }, { 0xff, 0xff, 0xff, 0xff }}}; diff --git a/src/pc/lua/utils/smlua_gfx_utils.c b/src/pc/lua/utils/smlua_gfx_utils.c index 3bfa7a6d1..389aa0e58 100644 --- a/src/pc/lua/utils/smlua_gfx_utils.c +++ b/src/pc/lua/utils/smlua_gfx_utils.c @@ -171,7 +171,7 @@ u16 gfx_get_vtx_count(Gfx* cmd) { if (op != G_VTX) { return 0; } if (cmd->words.w1 == 0) { return 0; } - return C0(12, 8); + return C0(cmd, 12, 8); } void gfx_set_combine_lerp(Gfx* gfx, u32 a0, u32 b0, u32 c0, u32 d0, u32 Aa0, u32 Ab0, u32 Ac0, u32 Ad0, u32 a1, u32 b1, u32 c1, u32 d1, u32 Aa1, u32 Ab1, u32 Ac1, u32 Ad1) {