three-gpu-pathtracer 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6950,7 +6950,8 @@ bool bvhIntersectFogVolumeHit(
6950
6950
  // get the material pdf
6951
6951
  vec3 sampleColor;
6952
6952
  float lightMaterialPdf = bsdfResult( worldWo, lightRec.direction, surf, sampleColor );
6953
- if ( lightMaterialPdf > 0.0 ) {
6953
+ bool isValidSampleColor = all( greaterThanEqual( sampleColor, vec3( 0.0 ) ) );
6954
+ if ( lightMaterialPdf > 0.0 && isValidSampleColor ) {
6954
6955
 
6955
6956
  // weight the direct light contribution
6956
6957
  float lightPdf = lightRec.pdf / lightsDenom;
@@ -6992,7 +6993,8 @@ bool bvhIntersectFogVolumeHit(
6992
6993
  // get the material pdf
6993
6994
  vec3 sampleColor;
6994
6995
  float envMaterialPdf = bsdfResult( worldWo, envDirection, surf, sampleColor );
6995
- if ( envMaterialPdf > 0.0 ) {
6996
+ bool isValidSampleColor = all( greaterThanEqual( sampleColor, vec3( 0.0 ) ) );
6997
+ if ( envMaterialPdf > 0.0 && isValidSampleColor ) {
6996
6998
 
6997
6999
  // weight the direct light contribution
6998
7000
  envPdf /= lightsDenom;