From 246fbd5442a2546fbf40c594c3515fb43edc0e82 Mon Sep 17 00:00:00 2001 From: William Deurwaarder Date: Fri, 24 Dec 2021 00:47:42 +0100 Subject: GPULightmapper: cube to panorama copy function flip y based on flag Cube to panorama copy function unconditionally flipped y, while other copy functions flipped y base on FLAG_FLIP_Y. Condition is added. --- servers/rendering/renderer_rd/shaders/copy.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'servers/rendering/renderer_rd/shaders') diff --git a/servers/rendering/renderer_rd/shaders/copy.glsl b/servers/rendering/renderer_rd/shaders/copy.glsl index 4110a95ddb..6b2671a42b 100644 --- a/servers/rendering/renderer_rd/shaders/copy.glsl +++ b/servers/rendering/renderer_rd/shaders/copy.glsl @@ -256,7 +256,9 @@ void main() { const float PI = 3.14159265359; vec2 uv = vec2(pos) / vec2(params.section.zw); - uv.y = 1.0 - uv.y; + if (bool(params.flags & FLAG_FLIP_Y)) { + uv.y = 1.0 - uv.y; + } float phi = uv.x * 2.0 * PI; float theta = uv.y * PI; -- cgit v1.2.3