alextewpin Posted March 25, 2019 Share Posted March 25, 2019 There are two sequential frames from animation, where dragon sprite and attached piece of UI moves from up to down. Left one is normal and right one is bit broken. Sprite itself (PIXI.extras.AnimatedSprite) and number 8 (PIXI.extras.BitmapText) looks perfectly fine through all animation, but HP bar background (PIXI.mesh.NineSlicePlane), HP bar itself (PIXI.Graphics) and number background are not hitting pixels perfectly sometimes and animation looks jaggy. PIXI.settings.SCALE_MODE is PIXI.SCALE_MODES.NEAREST. PIXI.settings.MIPMAP_TEXTURES is false. roundPixels is true. As I said, I have retina screen, so resolution is 2. I'm not sure if issue is reproduced on regular screen. I've searched through the docs but couldn't find any special settings for PIXI.mesh. I can make same UI from basic sprites of course, but NineSlicePlane is so much more convenient. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 25, 2019 Share Posted March 25, 2019 its easy to reproduce, i'll look into it please join https://t.me/gamedevforweb alextewpin 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 25, 2019 Share Posted March 25, 2019 is this v4 or v5? alextewpin 1 Quote Link to comment Share on other sites More sharing options...
alextewpin Posted March 25, 2019 Author Share Posted March 25, 2019 It's 4.8.2. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 25, 2019 Share Posted March 25, 2019 I dont see any round-related code in mesh in v4. https://github.com/pixijs/pixi.js/tree/v4.x/src/mesh and in graphics too: https://github.com/pixijs/pixi.js/tree/v4.x/src/core/graphics . Also, make sure that screen size is less than 4096 and CSS width/height that pixi set corresponds to canvas width/height. alextewpin 1 Quote Link to comment Share on other sites More sharing options...
alextewpin Posted March 25, 2019 Author Share Posted March 25, 2019 I've investigated a bit further, tried different setups and resolutions. Issue is reproduced even when resolution is 1. Reproduced with basic Mesh too. CSS seems fine and screen is less than 4096. Both Sprite and Mesh use correct step when animating (one logical pixel), so none of them are actually missing grid, but they are kinda out of sync. It's interesting that Graphics (green bar) moves in sync with sprite, even when hierarchy is AnimatedSpriteContainer -> Mesh -> Graphics. It's like Mesh positioned properly as container, but rendering is off for some reason. Will try to research more. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 26, 2019 Share Posted March 26, 2019 I suggest to make a demo at pixiplayground.com that way: create a renderTexture with resolution=2 , render something there, then render it on screen inside a sprite with big scale (x5 or so) , post it in https://github.com/pixijs/pixi.js/issues , that way we'll attract the rest of pixijs team. alextewpin 1 Quote Link to comment Share on other sites More sharing options...
alextewpin Posted March 27, 2019 Author Share Posted March 27, 2019 To summarise: Issue has nothing to do with resolution, it's roundPixels settings which is not working for meshes in v4: https://pixiplayground.com/#/edit/6zh8TlmkVtjxOBNPqh4f3 Similar code in v5 works fine: https://pixiplayground.com/#/edit/QKnINN4IETVUmNf80K8KT ivan.popelyshev 1 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.