summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorWilliam Deurwaarder <william.git@xs4all.nl>2021-12-24 00:47:42 +0100
committerWilliam Deurwaarder <william.git@xs4all.nl>2021-12-24 00:47:42 +0100
commit246fbd5442a2546fbf40c594c3515fb43edc0e82 (patch)
treec5c46777a1cee9879414c380a915a6b910c6789a /servers
parent9d02cfa6b4509f46dc31cca5542ba31bb9b94ae4 (diff)
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.
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering/renderer_rd/shaders/copy.glsl4
1 files changed, 3 insertions, 1 deletions
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;