Skip to content

Commit

Permalink
Remove raycasting from sdf
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Sep 27, 2024
1 parent 89be5c7 commit 66af558
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/utils/GenerateSDFMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export class GenerateSDFMaterial extends ShaderMaterial {
vec3 outPoint;
float dist = bvhClosestPointToPoint( bvh, point.xyz, faceIndices, faceNormal, barycoord, side, outPoint );
side = 1.0;
bvhIntersectFirstHit( bvh, point.xyz, vec3( 0.0, 0.0, 1.0 ), faceIndices, faceNormal, barycoord, side, rayDist );
// side = 1.0;
// bvhIntersectFirstHit( bvh, point.xyz, vec3( 0.0, 0.0, 1.0 ), faceIndices, faceNormal, barycoord, side, rayDist );
// if the triangle side is the back then it must be on the inside and the value negative
gl_FragColor = vec4( side * dist, 0, 0, 0 );
Expand Down

0 comments on commit 66af558

Please sign in to comment.