Skip to content

Commit

Permalink
renderer: fix uvBR calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
PaideiaDilemma committed Oct 2, 2024
1 parent e242694 commit cd6b88b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ void CHyprRenderer::calculateUVForSurface(PHLWINDOW pWindow, SP<CWLSurfaceResour
const auto HPERC = (double)(geom.y + geom.height) / (double)pSurface->current.size.y;

const auto TOADDTL = Vector2D(XPERC * (uvBR.x - uvTL.x), YPERC * (uvBR.y - uvTL.y));
uvBR = uvBR - Vector2D(1.0 - WPERC * (uvBR.x - uvTL.x), 1.0 - HPERC * (uvBR.y - uvTL.y));
uvBR = uvBR - Vector2D((1.0 - WPERC) * (uvBR.x - uvTL.x), (1.0 - HPERC) * (uvBR.y - uvTL.y));
uvTL = uvTL + TOADDTL;

// TODO: make this passed to the func. Might break in the future.
Expand Down

0 comments on commit cd6b88b

Please sign in to comment.