mirror of
https://github.com/Motschen/Blur.git
synced 2025-12-17 12:15:10 +01:00
Rewrite large parts of the mod
Blur is now more alive than ever, as I've been working on a new update: Blur+ 🪩 The mod's goal now is to improve upon the vanilla blur effect, adding smooth & configurable animations, the ability to apply it to containers (such as the inventory, chests, etc.), as well as customizable gradient backgrounds. 🌈
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
{
|
||||
"blur.midnightconfig.title": "Blur Config",
|
||||
"blur.midnightconfig.title": "Blur+ Config",
|
||||
"blur.midnightconfig.category.animations": "Animations",
|
||||
"blur.midnightconfig.category.style": "Style",
|
||||
"blur.midnightconfig.category.screens": "Screens",
|
||||
"blur.midnightconfig.blurExclusions": "Blur Exclusions",
|
||||
"blur.midnightconfig.blurContainers": "Apply Blur to Containers",
|
||||
"blur.midnightconfig.fadeTimeMillis": "Fade Time (in milliseconds)",
|
||||
"blur.midnightconfig.fadeOutTimeMillis": "Fade Out Time (in milliseconds)",
|
||||
"blur.midnightconfig.ease": "Ease Animation",
|
||||
"blur.midnightconfig.animationCurve": "Animation Curve",
|
||||
"blur.midnightconfig.enum.AnimationCurve.EASE": "Ease",
|
||||
"blur.midnightconfig.enum.AnimationCurve.FLAT": "Flat",
|
||||
"blur.midnightconfig.radius": "Radius",
|
||||
"blur.midnightconfig.useGradient": "Gradient as Background",
|
||||
"blur.midnightconfig.gradientStart": "Gradient Start Color",
|
||||
"blur.midnightconfig.gradientEnd": "Gradient End Color",
|
||||
"blur.midnightconfig.gradientStartAlpha": "Gradient Start Alpha",
|
||||
"blur.midnightconfig.gradientEndAlpha": "Gradient End Alpha",
|
||||
"blur.midnightconfig.showScreenTitle": "Log screen title"
|
||||
"blur.midnightconfig.gradientEndAlpha": "Gradient End Alpha"
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
{
|
||||
"targets": [
|
||||
"swap"
|
||||
],
|
||||
"passes": [
|
||||
{
|
||||
"name": "blur:fade_in_blur",
|
||||
"intarget": "minecraft:main",
|
||||
"outtarget": "swap",
|
||||
"uniforms": [
|
||||
{
|
||||
"name": "BlurDir",
|
||||
"values": [ 1.0, 0.0 ]
|
||||
},
|
||||
{
|
||||
"name": "Radius",
|
||||
"values": [ 8.0 ]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "blur:fade_in_blur",
|
||||
"intarget": "swap",
|
||||
"outtarget": "minecraft:main",
|
||||
"uniforms": [
|
||||
{
|
||||
"name": "BlurDir",
|
||||
"values": [ 0.0, 1.0 ]
|
||||
},
|
||||
{
|
||||
"name": "Radius",
|
||||
"values": [ 8.0 ]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "blur:fade_in_blur",
|
||||
"intarget": "minecraft:main",
|
||||
"outtarget": "swap",
|
||||
"uniforms": [
|
||||
{
|
||||
"name": "BlurDir",
|
||||
"values": [ 1.0, 0.0 ]
|
||||
},
|
||||
{
|
||||
"name": "Radius",
|
||||
"values": [ 8.0 ]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "blur:fade_in_blur",
|
||||
"intarget": "swap",
|
||||
"outtarget": "minecraft:main",
|
||||
"uniforms": [
|
||||
{
|
||||
"name": "BlurDir",
|
||||
"values": [ 0.0, 1.0 ]
|
||||
},
|
||||
{
|
||||
"name": "Radius",
|
||||
"values": [ 8.0 ]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
#version 150
|
||||
|
||||
uniform sampler2D DiffuseSampler;
|
||||
|
||||
in vec2 texCoord;
|
||||
in vec2 oneTexel;
|
||||
|
||||
uniform vec2 InSize;
|
||||
|
||||
uniform vec2 BlurDir;
|
||||
uniform float Radius;
|
||||
uniform float Progress;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
void main() {
|
||||
vec4 blurred = vec4(0.0);
|
||||
float totalStrength = 0.0;
|
||||
float totalAlpha = 0.0;
|
||||
float totalSamples = 0.0;
|
||||
float progRadius = floor(Radius * Progress);
|
||||
for(float r = -progRadius; r <= progRadius; r += 1.0) {
|
||||
vec4 sample = texture(DiffuseSampler, texCoord + oneTexel * r * BlurDir);
|
||||
|
||||
// Accumulate average alpha
|
||||
totalAlpha = totalAlpha + sample.a;
|
||||
totalSamples = totalSamples + 1.0;
|
||||
|
||||
// Accumulate smoothed blur
|
||||
float strength = 1.0 - abs(r / progRadius);
|
||||
totalStrength = totalStrength + strength;
|
||||
blurred = blurred + sample;
|
||||
}
|
||||
fragColor = vec4(blurred.rgb / (progRadius * 2.0 + 1.0), totalAlpha);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"blend": {
|
||||
"func": "add",
|
||||
"srcrgb": "srcalpha",
|
||||
"dstrgb": "1-srcalpha"
|
||||
},
|
||||
"vertex": "sobel",
|
||||
"fragment": "blur:fade_in_blur",
|
||||
"attributes": [ "Position" ],
|
||||
"samplers": [
|
||||
{ "name": "DiffuseSampler" }
|
||||
],
|
||||
"uniforms": [
|
||||
{ "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] },
|
||||
{ "name": "InSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] },
|
||||
{ "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] },
|
||||
{ "name": "BlurDir", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] },
|
||||
{ "name": "Radius", "type": "float", "count": 1, "values": [ 5.0 ] },
|
||||
{ "name": "Progress", "type": "float", "count": 1, "values": [ 0.0 ] }
|
||||
]
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "blur",
|
||||
"name": "Blur (Fabric)",
|
||||
"name": "Blur+ (Fabric)",
|
||||
"version": "$version",
|
||||
"environment": "client",
|
||||
"license": "MIT",
|
||||
"icon": "assets/blur/icon.png",
|
||||
"entrypoints": {
|
||||
"client": [
|
||||
"com.tterrag.blur.Blur"
|
||||
"eu.midnightdust.blur.Blur"
|
||||
]
|
||||
},
|
||||
"contact": {
|
||||
@@ -17,17 +17,17 @@
|
||||
"issues": "https://github.com/Motschen/Blur/issues"
|
||||
},
|
||||
"authors": [
|
||||
"tterrag1098",
|
||||
"Motschen",
|
||||
"tterrag1098",
|
||||
"Pyrofab",
|
||||
"backryun",
|
||||
"byquanton"
|
||||
],
|
||||
"description": "Modifies the background behind Minecraft GUIs to have a blur effect",
|
||||
"description": "Various Enhancements to the blur effect behind Minecraft GUIs",
|
||||
"mixins": [
|
||||
"mixins.blur.json"
|
||||
],
|
||||
"depends": {
|
||||
"satin": "*"
|
||||
"minecraft": ">1.20.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "com.tterrag.blur.mixin",
|
||||
"package": "eu.midnightdust.blur.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"client": [
|
||||
"MixinScreen",
|
||||
"MixinScreen",
|
||||
"MixinHandledScreen",
|
||||
"MixinMinecraftClient",
|
||||
"MixinGameRenderer",
|
||||
"MixinInGameHud"
|
||||
],
|
||||
"injectors": {
|
||||
|
||||
Reference in New Issue
Block a user