From 06cf493faa632f49d23441fda040ee46523da9a2 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sat, 29 Oct 2022 17:20:13 -0400 Subject: [PATCH] fix: downgrade frag shader for macos compat --- gradle.properties | 2 +- .../resources/assets/polyblur/shaders/monkeyblur.frag | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index c9a917b..ed514e3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_name = PolyBlur mod_id = polyblur -mod_version = 1.0.0-beta1 +mod_version = 1.0.0-beta2 essential.defaults.loom=0 diff --git a/src/main/resources/assets/polyblur/shaders/monkeyblur.frag b/src/main/resources/assets/polyblur/shaders/monkeyblur.frag index 7d44581..554c1b8 100644 --- a/src/main/resources/assets/polyblur/shaders/monkeyblur.frag +++ b/src/main/resources/assets/polyblur/shaders/monkeyblur.frag @@ -1,4 +1,4 @@ -#version 130 +#version 120 uniform sampler2D texture; uniform sampler2D depthtex; @@ -15,8 +15,11 @@ uniform float strength; varying vec4 texcoord; +uniform sampler2D textureName; +uniform vec2 textureName_size; + float maxDepth(vec2 texcoord, sampler2D tex) { - vec2 t = 1 / textureSize(tex, 0); + vec2 t = 1 / textureName_size; float depth = 1; @@ -31,7 +34,7 @@ float maxDepth(vec2 texcoord, sampler2D tex) { } void main() { - vec2 texelSize = textureSize(depthtex, 0); + vec2 texelSize = textureName_size; vec3 color = texture2D(texture, texcoord.st).rgb;