fix a NaN issue in envmap.cpp
parent
fcae6a3314
commit
ff025d558f
|
@ -160,7 +160,8 @@ public:
|
|||
|
||||
Vector sampledDirection(sinTheta * sinPhi,
|
||||
cosTheta, -sinTheta*cosPhi);
|
||||
pdf = pdf / (m_pdfPixelSize.x * m_pdfPixelSize.y * sinTheta);
|
||||
pdf = pdf / (m_pdfPixelSize.x * m_pdfPixelSize.y
|
||||
* std::max(Epsilon, sinTheta));
|
||||
|
||||
return m_luminaireToWorld(-sampledDirection);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue