• Runtimes
  • Question about antialiasing in Spine WebGL

  • Изменено
Related Discussions
...
  • Изменено

How to do antialiasing when background is set to transparent.

WebGL Canvas is on top of an div.

This looks less like an AA issue, and more like a blending issue. I assume your WebGL canvas is transparent? Are you exporting and rendering your skeleton with pre-multiplied alpha?

Mario написал

This looks less like an AA issue, and more like a blending issue. I assume your WebGL canvas is transparent? Are you exporting and rendering your skeleton with pre-multiplied alpha?

Setting alpha as true, premultipliedAlpha as false and:

let bg = new spine.Color(0, 0, 0, 0);
gl.clearColor(bg.r, bg.g, bg.b, bg.a);
gl.clear(gl.COLOR_BUFFER_BIT);

removed the white edges.