mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-08 20:01:30 +11:00
Proper inverse of translation components
This commit is contained in:
parent
c65c19dc4f
commit
3c15bff867
|
@ -151,7 +151,10 @@ fn main(
|
|||
let r1 = bitcast<f32>(scene[dd + 6u]);
|
||||
let inv_det = 1.0 / (matrx.x * matrx.w - matrx.y * matrx.z);
|
||||
let inv_mat = inv_det * vec4(matrx.w, -matrx.y, -matrx.z, matrx.x);
|
||||
var inv_tr = inv_mat.xz * translate.x + inv_mat.yw * translate.y;
|
||||
var inv_tr = vec2(
|
||||
inv_det * (matrx.z * translate.y - matrx.w * translate.x),
|
||||
inv_det * (matrx.y * translate.x - matrx.x * translate.y),
|
||||
);
|
||||
inv_tr += p0;
|
||||
let center1 = p1 - p0;
|
||||
let rr = r1 / (r1 - r0);
|
||||
|
|
Loading…
Reference in a new issue