handle some rare/odd cases where a medium surrounds the camera and a distant environment map
parent
50501fc154
commit
6021ee09f9
|
@ -186,8 +186,13 @@ public:
|
|||
if (!its.isValid()) {
|
||||
/* If no intersection could be found, possibly return
|
||||
attenuated radiance from a background luminaire */
|
||||
if (rRec.type & RadianceQueryRecord::EEmittedRadiance)
|
||||
Li += throughput * scene->evalEnvironment(ray);
|
||||
if (rRec.type & RadianceQueryRecord::EEmittedRadiance) {
|
||||
Spectrum value = throughput * scene->evalEnvironment(ray);
|
||||
if (rRec.medium)
|
||||
value *= rRec.medium->evalTransmittance(ray);
|
||||
Li += value;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -165,8 +165,12 @@ public:
|
|||
if (!its.isValid()) {
|
||||
/* If no intersection could be found, possibly return
|
||||
attenuated radiance from a background luminaire */
|
||||
if (rRec.type & RadianceQueryRecord::EEmittedRadiance)
|
||||
Li += throughput * scene->evalEnvironment(ray);
|
||||
if (rRec.type & RadianceQueryRecord::EEmittedRadiance) {
|
||||
Spectrum value = throughput * scene->evalEnvironment(ray);
|
||||
if (rRec.medium)
|
||||
value *= rRec.medium->evalTransmittance(ray);
|
||||
Li += value;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue