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.
- package/build/index.module.js +4 -2
- package/build/index.module.js.map +1 -1
- package/build/index.umd.cjs +4 -2
- package/build/index.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/materials/pathtracing/glsl/directLightContribution.glsl.js +4 -2
- package/src/materials/surface/AmbientOcclusionMaterial.js +1 -1
package/build/index.umd.cjs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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;
|