plugins/glide: Subdivide window quad grid
The way the glide effect works is that it takes 2D geometry and applies the perspective projection to it on the CPU side. The reason we do it is that the scene is 2D. However, this leaves us with the well known problem where a texture that's mapped to a trapezoid won't be correctly interpolated along the diagonal. It can addressed by performing a perspective division in the fragment shader, but given the way the effect is structured, it's off the table. So instead subdivide the window grid. BUG: 488840
This commit is contained in:
parent
b745f83339
commit
7eb9f75af2
1 changed files with 1 additions and 0 deletions
|
@ -145,6 +145,7 @@ void GlideEffect::apply(EffectWindow *window, int mask, WindowPaintData &data, W
|
|||
break;
|
||||
}
|
||||
|
||||
quads = quads.makeRegularGrid(20, 20);
|
||||
for (WindowQuad &quad : quads) {
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
const QPointF transformed = matrix.map(QPointF(quad[i].x(), quad[i].y()));
|
||||
|
|
Loading…
Reference in a new issue