From: Perry Fraser Date: Tue, 17 Jun 2025 21:05:12 +0000 (-0400) Subject: fix: deglitchify drowsiness effect on macOS (#37817) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=9a605c864278b988f1dd5aa8016930199a339cd6;p=space-station-14.git fix: deglitchify drowsiness effect on macOS (#37817) --- diff --git a/Resources/Textures/Shaders/radial_blur.swsl b/Resources/Textures/Shaders/radial_blur.swsl index f3224ce06c..55a89c31b4 100644 --- a/Resources/Textures/Shaders/radial_blur.swsl +++ b/Resources/Textures/Shaders/radial_blur.swsl @@ -4,11 +4,13 @@ const highp int SampleCount = 10; // a higher number makes the shader look bette // a simple radial blur void fragment() { - highp vec2 uv = FRAGCOORD.xy * SCREEN_PIXEL_SIZE.xy; - highp vec2 direction = vec2(0.5, 0.5) - uv; + highp vec3 col = texture(SCREEN_TEXTURE, UV).xyz; + highp vec4 color = zTexture(UV); + highp vec2 direction = vec2(0.5, 0.5) - UV; for (int i=1; i <= SampleCount; i++) { - COLOR += zTextureSpec(SCREEN_TEXTURE, uv + float(i) * Strength / float(SampleCount) * direction); + col += zTextureSpec(SCREEN_TEXTURE, UV + float(i) * Strength / float(SampleCount) * direction).xyz; } - COLOR = COLOR / float(SampleCount); + col = col / float(SampleCount); + COLOR = vec4(vec3(col), color.a); }