flamingdog Posted September 10, 2015 Share Posted September 10, 2015 Hello, im beginner with PIXI, so Im not sure if its not my mistake.. Hovewer, here is the problem: (in Chrome either Canvas & WebGL, not in Firefox).. I have some textures in JSON.. All coordinates are correct in the json file, but when I create sprite from some of the textures in JSON, there is sometimes small line from surrounding textures.. It looks like the sprite was created from upsized interpolated texturesheet or what... Did someone experience similar problem? thanks. Pixi version 3.0.7 screenshot from sprite. You can see thin line on the left. JSON graphics: AndreasLoew 1 Quote Link to comment Share on other sites More sharing options...
rich Posted September 10, 2015 Share Posted September 10, 2015 Add padding to your atlas. Texture Packer has an 'inner padding' option to stop exactly this from happening. 1 or 2 px should be plenty. Quote Link to comment Share on other sites More sharing options...
AndreasLoew Posted September 11, 2015 Share Posted September 11, 2015 This artifact comes from rounding in OpenGL. Sometimes neighbor pixels get dragged in. Adding transparency helps here. I would not recommend using "inner padding" - this would extend your sprite - and you might not want that. Please use "ShapePadding" instead - it adds transparency outside your sprites. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.