mirror of
https://github.com/Motschen/Blur.git
synced 2025-12-15 19:25:09 +01:00
fix: move gradient z-coordinate further back
This commit is contained in:
@@ -95,7 +95,7 @@ public class Blur {
|
|||||||
context.getMatrices().push();
|
context.getMatrices().push();
|
||||||
Matrix4f posMatrix = context.getMatrices().peek().getPositionMatrix();
|
Matrix4f posMatrix = context.getMatrices().peek().getPositionMatrix();
|
||||||
posMatrix.rotationZ(Math.toRadians(getRotation()));
|
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
|
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.fillGradient(-width / 2, -height / 2, width / 2, height / 2, Blur.getBackgroundColor(false), Blur.getBackgroundColor(true)); // Actually draw the gradient
|
||||||
context.getMatrices().pop();
|
context.getMatrices().pop();
|
||||||
|
|||||||
Reference in New Issue
Block a user