Fix the cube map directions, hopefully

This commit is contained in:
Magnus Norddahl 2025-02-16 23:20:33 +01:00
commit 48e769b635
2 changed files with 21 additions and 21 deletions

View file

@ -280,23 +280,23 @@ TArray<uint16_t> VkLightprober::GenerateIrradianceMap()
cmdbuffer->bindPipeline(VK_PIPELINE_BIND_POINT_COMPUTE, irradianceMap.pipeline.get());
// +x, +y, +z, -x, -y, -z
// +x, -x, +y, -y, +z, -z
FVector3 dir[6] = {
FVector3( 1.0f, 0.0f, 0.0f),
FVector3( 0.0f, 1.0f, 0.0f),
FVector3( 0.0f, 0.0f, 1.0f),
FVector3(-1.0f, 0.0f, 0.0f),
FVector3( 0.0f, 1.0f, 0.0f),
FVector3( 0.0f, -1.0f, 0.0f),
FVector3( 0.0f, 0.0f, 1.0f),
FVector3( 0.0f, 0.0f, -1.0f)
};
FVector3 up[6] = {
FVector3(0.0f, -1.0f, 0.0f),
FVector3(0.0f, -1.0f, 0.0f),
FVector3(0.0f, 0.0f, 1.0f),
FVector3(0.0f, -1.0f, 0.0f),
FVector3(0.0f, -1.0f, 0.0f),
FVector3(0.0f, 0.0f, -1.0f),
FVector3(0.0f, -1.0f, 0.0f),
FVector3(0.0f, -1.0f, 0.0f)
};
@ -422,23 +422,23 @@ TArray<uint16_t> VkLightprober::GeneratePrefilterMap()
cmdbuffer->bindPipeline(VK_PIPELINE_BIND_POINT_COMPUTE, prefilterMap.pipeline.get());
// +x, +y, +z, -x, -y, -z
// +x, -x, +y, -y, +z, -z
FVector3 dir[6] = {
FVector3( 1.0f, 0.0f, 0.0f),
FVector3( 0.0f, 1.0f, 0.0f),
FVector3( 0.0f, 0.0f, 1.0f),
FVector3(-1.0f, 0.0f, 0.0f),
FVector3( 0.0f, 1.0f, 0.0f),
FVector3( 0.0f, -1.0f, 0.0f),
FVector3( 0.0f, 0.0f, 1.0f),
FVector3( 0.0f, 0.0f, -1.0f)
};
FVector3 up[6] = {
FVector3(0.0f, -1.0f, 0.0f),
FVector3(0.0f, -1.0f, 0.0f),
FVector3(0.0f, 0.0f, 1.0f),
FVector3(0.0f, -1.0f, 0.0f),
FVector3(0.0f, -1.0f, 0.0f),
FVector3(0.0f, 0.0f, -1.0f),
FVector3(0.0f, -1.0f, 0.0f),
FVector3(0.0f, -1.0f, 0.0f)
};