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.
This commit is contained in:
William Deurwaarder 2021-12-24 00:47:42 +01:00
parent 9d02cfa6b4
commit 246fbd5442

View file

@ -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;