fix: move gradient z-coordinate further back

This commit is contained in:
Martin Prokoph
2025-04-23 10:18:55 +02:00
parent 528958fa8c
commit fa6fd82e4d

View File

@@ -95,7 +95,7 @@ public class Blur {
context.getMatrices().push();
Matrix4f posMatrix = context.getMatrices().peek().getPositionMatrix();
posMatrix.rotationZ(Math.toRadians(getRotation()));
posMatrix.setTranslation(width / 2f, height / 2f, -1); // Make the gradient's center the pivot point
posMatrix.setTranslation(width / 2f, height / 2f, -1000); // Make the gradient's center the pivot point
posMatrix.scale(diagonal / smallestDimension); // Scales the gradient to the maximum diagonal value needed
context.fillGradient(-width / 2, -height / 2, width / 2, height / 2, Blur.getBackgroundColor(false), Blur.getBackgroundColor(true)); // Actually draw the gradient
context.getMatrices().pop();