Skip to content

Commit 1b0a229

Browse files
committed
Fix Handedness for Cubemap rendering (switch x+ and x-)
1 parent d414c3f commit 1b0a229

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples_tests/22.RaytracedAO/main.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ int main(int argc, char** argv)
575575
}
576576
else if (mainSensorData.type == ext::MitsubaLoader::CElementSensor::Type::SPHERICAL)
577577
{
578-
const nbl::core::vectorSIMDf camViews[6] =
578+
nbl::core::vectorSIMDf camViews[6] =
579579
{
580580
nbl::core::vectorSIMDf(+1, 0, 0, 0), // +X
581581
nbl::core::vectorSIMDf(-1, 0, 0, 0), // -X
@@ -584,6 +584,12 @@ int main(int argc, char** argv)
584584
nbl::core::vectorSIMDf(0, 0, +1, 0), // +Z
585585
nbl::core::vectorSIMDf(0, 0, -1, 0), // -Z
586586
};
587+
588+
if(!mainSensorData.rightHandedCamera)
589+
{
590+
camViews[0] *= -1;
591+
camViews[1] *= -1;
592+
}
587593

588594
const nbl::core::vectorSIMDf upVectors[6] =
589595
{

0 commit comments

Comments
 (0)