diff --git a/src/pc/djui/djui_gfx.c b/src/pc/djui/djui_gfx.c index 80b41331f..b8d76f201 100644 --- a/src/pc/djui/djui_gfx.c +++ b/src/pc/djui/djui_gfx.c @@ -105,10 +105,10 @@ void djui_gfx_render_texture_tile(const u8* texture, u32 w, u32 h, u32 bitSize, Vtx *vtx = alloc_display_list(sizeof(Vtx) * 4); f32 aspect = tileH ? ((f32)tileW / (f32)tileH) : 1; // I don't know why adding 1 to all of the UVs seems to fix rendering, but it does... - vtx[0] = (Vtx) {{{ 0, -1, 0 }, 0, { ( tileX * 512) / w + 1, ((tileY + tileH) * 512) / h + 1 }, { 0xff, 0xff, 0xff, 0xff }}}; - vtx[1] = (Vtx) {{{ 1 * aspect, -1, 0 }, 0, { ((tileX + tileW) * 512) / w + 1, ((tileY + tileH) * 512) / h + 1 }, { 0xff, 0xff, 0xff, 0xff }}}; - vtx[2] = (Vtx) {{{ 1 * aspect, 0, 0 }, 0, { ((tileX + tileW) * 512) / w + 1, ( tileY * 512) / h + 1 }, { 0xff, 0xff, 0xff, 0xff }}}; - vtx[3] = (Vtx) {{{ 0, 0, 0 }, 0, { ( tileX * 512) / w + 1, ( tileY * 512) / h + 1 }, { 0xff, 0xff, 0xff, 0xff }}}; + vtx[0] = (Vtx) {{{ 0, -1, 0 }, 0, { ( tileX * 512) / w + 1, ((tileY + tileH) * 512) / h }, { 0xff, 0xff, 0xff, 0xff }}}; + vtx[1] = (Vtx) {{{ 1 * aspect, -1, 0 }, 0, { ((tileX + tileW) * 512) / w + 1, ((tileY + tileH) * 512) / h }, { 0xff, 0xff, 0xff, 0xff }}}; + vtx[2] = (Vtx) {{{ 1 * aspect, 0, 0 }, 0, { ((tileX + tileW) * 512) / w + 1, ( tileY * 512) / h }, { 0xff, 0xff, 0xff, 0xff }}}; + vtx[3] = (Vtx) {{{ 0, 0, 0 }, 0, { ( tileX * 512) / w + 1, ( tileY * 512) / h }, { 0xff, 0xff, 0xff, 0xff }}}; gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); gDPSetCombineMode(gDisplayListHead++, G_CC_FADEA, G_CC_FADEA);