fixed an instance bug that occurs in conjunction with analytic shapes
parent
cda2bc02b9
commit
2e334d9eb4
|
@ -101,9 +101,11 @@ bool Instance::rayIntersect(const Ray &_ray, Float mint, Float maxt) const {
|
|||
return kdtree->rayIntersect(ray, mint, maxt);
|
||||
}
|
||||
|
||||
void Instance::fillIntersectionRecord(const Ray &ray,
|
||||
void Instance::fillIntersectionRecord(const Ray &_ray,
|
||||
const void *temp, Intersection &its) const {
|
||||
const ShapeKDTree *kdtree = m_shapeGroup->getKDTree();
|
||||
Ray ray;
|
||||
m_worldToObject(_ray, ray);
|
||||
kdtree->fillIntersectionRecord<false>(ray, temp, its);
|
||||
its.shFrame.n = normalize(m_objectToWorld(its.shFrame.n));
|
||||
its.shFrame.s = normalize(m_objectToWorld(its.shFrame.s));
|
||||
|
@ -112,6 +114,7 @@ void Instance::fillIntersectionRecord(const Ray &ray,
|
|||
its.wi = its.shFrame.toLocal(-ray.d);
|
||||
its.dpdu = m_objectToWorld(its.dpdu);
|
||||
its.dpdv = m_objectToWorld(its.dpdv);
|
||||
its.p = m_objectToWorld(its.p);
|
||||
}
|
||||
|
||||
MTS_IMPLEMENT_CLASS_S(Instance, false, Shape)
|
||||
|
|
Loading…
Reference in New Issue