WinMac32 Posted June 24, 2015 Share Posted June 24, 2015 Hi there. I'm currently scratching my head at a little graphics glitch I've been having. I'm hoping someone here can help me out. http://i.imgur.com/af7tUsG.jpg These lines occur intermittently, and only when moving. Here is the setup: The tiles each have their own container, with usually around 2-3 sprites for walls and 1 for floors.The positions of the tiles are set once, and added to a world container. Empty solid grey space is just empty, no containers/sprites.The world container is then added to the root container and translated around the camera. So despite the fact that I have handed all control over the translation of individual tiles to Pixi, this still happens. I'm honestly stumped. Thank you for any support you could give me on this matter. Quote Link to comment Share on other sites More sharing options...
xerver Posted June 24, 2015 Share Posted June 24, 2015 > These lines occur intermittently, and only when moving. What is happening is that your objects move into floating point coordinates, and rounding errors cause gaps. Flooring positions or using NEAREST scaling will fix the issue. d13 1 Quote Link to comment Share on other sites More sharing options...
d13 Posted June 24, 2015 Share Posted June 24, 2015 texture.baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST; Quote Link to comment Share on other sites More sharing options...
WinMac32 Posted June 24, 2015 Author Share Posted June 24, 2015 Yes. That was the issue. I had gotten it into my head that since I put all of the tiles into a container and only moved the container, I wouldn't have to worry about rounding issues. However, if the container is just adding its position to the children, I suppose it would make sense that it is something to consider. The more you know, I guess. Thank you for your help on this matter. Quote Link to comment Share on other sites More sharing options...
d13 Posted June 25, 2015 Share Posted June 25, 2015 I wouldn't have to worry about rounding issues. WebGL likes floating point values, we like pixels By the way, this seems to be a consistent problem (it is for me).Can anyone from the Pixi dev team who might be reading this comment on why `NEAREST` isn't the default? 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.