fixed incorrect shadow map extents
parent
65e8b96185
commit
0dc517bfa4
|
@ -193,9 +193,9 @@ void VPLShaderManager::setVPL(const VPL &vpl) {
|
||||||
Vector dir;
|
Vector dir;
|
||||||
Point2 seed(i*invSampleCount, radicalInverse(2, i)); // Hammersley seq.
|
Point2 seed(i*invSampleCount, radicalInverse(2, i)); // Hammersley seq.
|
||||||
if (vpl.type == ELuminaireVPL && vpl.luminaire->getType() & Luminaire::EOnSurface)
|
if (vpl.type == ELuminaireVPL && vpl.luminaire->getType() & Luminaire::EOnSurface)
|
||||||
dir = squareToSphere(seed);
|
|
||||||
else
|
|
||||||
dir = vpl.its.shFrame.toWorld(squareToHemispherePSA(seed));
|
dir = vpl.its.shFrame.toWorld(squareToHemispherePSA(seed));
|
||||||
|
else
|
||||||
|
dir = squareToSphere(seed);
|
||||||
ray.setDirection(dir);
|
ray.setDirection(dir);
|
||||||
if (m_scene->rayIntersect(ray, its)) {
|
if (m_scene->rayIntersect(ray, its)) {
|
||||||
nearClip = std::min(nearClip, its.t);
|
nearClip = std::min(nearClip, its.t);
|
||||||
|
|
Loading…
Reference in New Issue