From 0dc517bfa4c17c2b0d813258d9f74a210fca71bb Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Wed, 8 Sep 2010 01:14:50 +0200 Subject: [PATCH] fixed incorrect shadow map extents --- src/libhw/vpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libhw/vpl.cpp b/src/libhw/vpl.cpp index ab771b7b..c8e02104 100644 --- a/src/libhw/vpl.cpp +++ b/src/libhw/vpl.cpp @@ -193,9 +193,9 @@ void VPLShaderManager::setVPL(const VPL &vpl) { Vector dir; Point2 seed(i*invSampleCount, radicalInverse(2, i)); // Hammersley seq. if (vpl.type == ELuminaireVPL && vpl.luminaire->getType() & Luminaire::EOnSurface) - dir = squareToSphere(seed); - else dir = vpl.its.shFrame.toWorld(squareToHemispherePSA(seed)); + else + dir = squareToSphere(seed); ray.setDirection(dir); if (m_scene->rayIntersect(ray, its)) { nearClip = std::min(nearClip, its.t);