Fix cubemap orientation;

+Z is the front face in a cubemap, not -Z.  Currently cubemap faces are
flipped in both the X and Z directions.

Some kind of flip is required because cubemaps use a left-handed
coordinate space instead of lovr's/vulkan's right-handed coordinate
space.

Equirect does not need any changes.

(cherry picked from commit 1b1bc182bf)
This commit is contained in:
bjorn 2024-01-06 13:58:14 -08:00
parent 35228f1838
commit 5611a6130b
1 changed files with 1 additions and 1 deletions

View File

@ -7,5 +7,5 @@
layout(set = 1, binding = 1) uniform textureCube SkyboxTexture;
vec4 lovrmain() {
return Color * getPixel(SkyboxTexture, Normal * vec3(-1, 1, 1));
return Color * getPixel(SkyboxTexture, Normal * vec3(1, 1, -1));
}