fix corner bug

This commit is contained in:
Orion Reed 2024-12-01 20:38:09 -05:00
parent 6b8566fa30
commit 8f7ce62b5d
1 changed files with 4 additions and 0 deletions

View File

@ -138,6 +138,10 @@ export class DistanceField extends HTMLElement {
vec4 sampled = texture(u_previousTexture, sampleCoord);
if (sampled.z == 0.0) {
continue; // Skip background pixels
}
// Compute distance to the seed point stored in this neighbor
float dist = distance(sampled.xy, v_texCoord);