From d46cb40da24a5e7a070854f07c875983d375a4bf Mon Sep 17 00:00:00 2001 From: IntegratedQuantum Date: Sun, 4 Oct 2026 19:40:08 +0200 Subject: [PATCH] Move coordinate inversion to the color extractor --- assets/cubyz/shaders/bloom/color_extractor_downsample.vert | 4 ++++ assets/cubyz/shaders/bloom/first_pass.vert | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/cubyz/shaders/bloom/color_extractor_downsample.vert b/assets/cubyz/shaders/bloom/color_extractor_downsample.vert index afbe93119d..302ee23dc5 100644 --- a/assets/cubyz/shaders/bloom/color_extractor_downsample.vert +++ b/assets/cubyz/shaders/bloom/color_extractor_downsample.vert @@ -12,7 +12,11 @@ layout(location = 0) uniform mat4 invViewMatrix; layout(location = 1) uniform vec2 tanXY; void main() { +#ifdef OPEN_GL + vec2 position = vec2(inTexCoords.x, 1 - inTexCoords.y)*2 - vec2(1, 1); +#else vec2 position = inTexCoords*2 - vec2(1, 1); +#endif direction = (invViewMatrix * vec4(position.x*tanXY.x, 1, position.y*tanXY.y, 0)).xyz; normalizedTexCoords = inTexCoords; texCoords = inTexCoords*textureSize(color, 0) - 0.25; diff --git a/assets/cubyz/shaders/bloom/first_pass.vert b/assets/cubyz/shaders/bloom/first_pass.vert index 1b5aaad3af..a6b4225354 100644 --- a/assets/cubyz/shaders/bloom/first_pass.vert +++ b/assets/cubyz/shaders/bloom/first_pass.vert @@ -5,10 +5,6 @@ layout(location = 0) in vec2 inTexCoords; layout(location = 0) out vec2 texCoords; void main() { -#ifdef OPEN_GL - texCoords = vec2(inTexCoords.x, 1 - inTexCoords.y); -#else texCoords = inTexCoords; -#endif gl_Position = vec4(inTexCoords*2 + vec2(-1, -1), 0, 1); }