diff --git a/packages/client/src/lib/template.ts b/packages/client/src/lib/template.ts index 4770fdd2cd2efb3bffde6cd6aa9269e3eea38e78..75262f0e456364dcaee40934aba466bdb817c929 100644 --- a/packages/client/src/lib/template.ts +++ b/packages/client/src/lib/template.ts @@ -510,7 +510,11 @@ export class Template extends EventEmitter { vec2 styleCoord = (indexCoord + subTexCoord) * styleSize; vec4 styleMask = vec4(1.0, 1.0, 1.0, texture2D(u_Style, styleCoord).a); - gl_FragColor = vec4(templateSample.rgb, templateSample.a == PALETTE_TRANSPARENT ? 0.0 : 1.0) * styleMask; + if (texture2D(u_Style, styleCoord).a == 1.0) { + gl_FragColor = vec4(templateSample.rgb, templateSample.a == PALETTE_TRANSPARENT ? 0.0 : 1.0) * styleMask; + } else { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); + } } ` );