Skip to content

Commit

Permalink
Address Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zalo committed Sep 23, 2024
1 parent d67f3d4 commit aec5033
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/sdfGeneration.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ function updateSDF() {
ray.origin.copy( point );
ray.direction.set( 0, 0, 1 );
const hit = bvh.raycastFirst( ray, THREE.DoubleSide );
let isInside = hit && hit.face.normal.dot( ray.direction ) > 0.0;
const isInside = hit && hit.face.normal.dot( ray.direction ) > 0.0;

// set the distance in the texture data
sdfTex.image.data[ index ] = isInside > 0.0 ? - dist : dist;
sdfTex.image.data[ index ] = isInside ? - dist : dist;

}

Expand Down

0 comments on commit aec5033

Please sign in to comment.