fix corner bug
This commit is contained in:
parent
6b8566fa30
commit
8f7ce62b5d
|
|
@ -138,6 +138,10 @@ export class DistanceField extends HTMLElement {
|
||||||
|
|
||||||
vec4 sampled = texture(u_previousTexture, sampleCoord);
|
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
|
// Compute distance to the seed point stored in this neighbor
|
||||||
float dist = distance(sampled.xy, v_texCoord);
|
float dist = distance(sampled.xy, v_texCoord);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue