Jump to content

How to get rid of these gaps?


wayfinder
 Share

Recommended Posts

Hi there! 

 

I modified the code from pixi's rope object to allow mapping an arbitrary convex quadrilateral UV area to an arbitrary convex quadrilateral screen area, by splitting all of it into triangles and using affine transformations on them. This works well, except for miniscule gaps between quads which I cannot seem to get rid of:

 

vtjKfUv.png

 

These gaps do not seem to appear between the triangles that make up the quads, only between quads. I've tried drawing with a large overdraw value but it doesn't help. If I expand just the screen triangles and not the UV coordinates, the stuff ends up in the wrong place, and if I expand the UV coords along with the screeen coords, it looks exactly as if I never changed anything :(

 

Does anybody have an idea on what to do? 

 

 

 

 

Link to comment
Share on other sites

Generally, Firefox has different rounding methods throughout its Canvas rendering engine. It does a lot more rounding, making things faster sometimes, but less smooth.

 

... Anyway, this might be a bug in pixi.js, because Firefox can do anti-aliasing in canvas elements just like Chrome, but the naming is different. Not sure if that anti-alias stuff applies to webgl, though...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...