mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 18:25:59 +01:00
renderer: fix uvBR calculation (#7975)
This commit is contained in:
parent
de68e065fe
commit
aed529f695
1 changed files with 1 additions and 1 deletions
|
@ -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 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));
|
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;
|
uvTL = uvTL + TOADDTL;
|
||||||
|
|
||||||
// TODO: make this passed to the func. Might break in the future.
|
// TODO: make this passed to the func. Might break in the future.
|
||||||
|
|
Loading…
Reference in a new issue