Skip to content
Snippets Groups Projects
Commit 5a272564 authored by Wenzel Jakob's avatar Wenzel Jakob
Browse files

fix perspective_rdist issues reported by Sebastian Novozin

parent 7f5aa0c0
No related branches found
Tags v0.1.11
No related merge requests found
......@@ -398,11 +398,16 @@ public:
near plane (in local camera space) */
Point nearP = m_sampleToCamera(samplePos);
if (m_distortion) {
Float correction = invertDistortion(Vector2(nearP.x / nearP.z, nearP.y / nearP.z).length());
nearP.x *= correction; nearP.y *= correction;
}
/* Turn that into a normalized ray direction */
Vector d = normalize(Vector(nearP));
dRec.d = trafo(d);
dRec.measure = ESolidAngle;
dRec.pdf = m_normalization / (d.z * d.z * d.z);
dRec.pdf = pdfDirection(dRec, pRec);
return Spectrum(1.0f);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment