Skip to content

Commit 57b1b74

Browse files
committed
Pre-flip Unity Engine textures vertically to make them less annoying in texture mod toolkit
1 parent 5e96f57 commit 57b1b74

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/render/d3d11/mod_tools/d3d11_texture_mods.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,8 +1233,11 @@ SK_D3D11_LiveTextureView (bool& can_scroll, SK_TLS* pTLS = SK_TLS_Bottom ())
12331233

12341234
if (SUCCEEDED (pDev->CreateShaderResourceView (pTex, &srv_desc, &pSRV.p)))
12351235
{
1236-
const ImVec2 uv0 (flip_horizontal ? 1.0f : 0.0f, flip_vertical ? 1.0f : 0.0f);
1237-
const ImVec2 uv1 (flip_horizontal ? 0.0f : 1.0f, flip_vertical ? 0.0f : 1.0f);
1236+
// Pre-flip Unity textures
1237+
const ImVec2 uv0 (flip_horizontal ? 1.0f : 0.0f, flip_vertical ? rb.windows.unity ? 0.0f : 1.0f :
1238+
rb.windows.unity ? 1.0f : 0.0f);
1239+
const ImVec2 uv1 (flip_horizontal ? 0.0f : 1.0f, flip_vertical ? rb.windows.unity ? 0.0f : 1.0f :
1240+
rb.windows.unity ? 1.0f : 0.0f);
12381241

12391242
ImGui::BeginChildFrame (ImGui::GetID ("TextureView_Frame"), ImVec2 (effective_width + 8.0f, effective_height + 8.0f),
12401243
ImGuiWindowFlags_AlwaysAutoResize |

0 commit comments

Comments
 (0)