question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Polygon cacheAsBitmap - antialias do not work (smoth)

See original GitHub issue

WebGL Pixi 4.7

I can’t fix antialias of polygon shape after setting cacheAsBitmap . I am using WebGLRenderer and antialias: true to smoth shapes on canvas and as I know, using many shapes can slow down pixi so added cacheAsBitmap to polygons on the canvas.

After setting it to true, antialias stopped working for these shapes so I made simple fiddle for rectangle and I was very surprised because it worked well. It looks like that for some reason shapes made with drawPolygon method lose their smoothness when cacheAsBitmap is set to true. Fiddle with simple exmaple: https://jsfiddle.net/mtdh9vr7/20/

How to fix it?

Screenshot from fiddle: obraz

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ivanpopelyshevcommented, Mar 11, 2018

499 extra drawElements and bindBuffer calls are comparable to the actual rendering time. Go benchmark it.

1reaction
ivanpopelyshevcommented, Mar 10, 2018

Oh, you are right. That’s my line! Lets make it 300.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android: Why your Canvas shapes aren't smooth - Medium
As you can see, anti-alias produces a smooth edge. This works because each time onDraw is called, the canvas is cleared and everything...
Read more >
Android Canvas.drawLine not smooth, not consistent
Notice the way the lines render, they break on the round shapes and don't join smoothly. I understand why is it happening but...
Read more >
To Smooth a Set of Polygons - Bentley - Product Documentation
Select the Facet Smoothing tool. In the tool settings window, set Mode to Attach. Accept. Note: There is no tolerance to which polygons...
Read more >
My technique for anti-aliased animation and bitmaps
As we know, drawing native polygons and lines are not anti-aliased. I actually built a little library that draws AA lines, and simple...
Read more >
Getting Started with StageGL - CreateJS Blog -
Turning on antialiasing with StageGL doesn't mean your textures have to be SPOT; however, you won't notice consistent smoothing quality ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found