From 1fd0f671dfcb77f813c0d6a36f2aa4e480b5ca8e Mon Sep 17 00:00:00 2001 From: Girish Ramesh Date: Wed, 2 May 2018 14:00:42 +0100 Subject: [PATCH] Fixed partial derivative NaN error for hair (#60) --- src/shapes/hair.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shapes/hair.cpp b/src/shapes/hair.cpp index 9106be9d..19a9c693 100644 --- a/src/shapes/hair.cpp +++ b/src/shapes/hair.cpp @@ -846,6 +846,7 @@ void HairShape::fillIntersectionRecord(const Ray &ray, its.p += its.geoFrame.n * (m_kdtree->getRadius() - std::sqrt(local.y*local.y+local.z*local.z)); its.shFrame.n = its.geoFrame.n; + coordinateSystem(its.shFrame.n, its.dpdu, its.dpdv); its.hasUVPartials = false; its.instance = this; its.time = ray.time;