TheShookOne Posted September 5, 2017 Share Posted September 5, 2017 Hi all I've been making a game with lots of sprites which use high resolution textures. I am hoping to give the option to replace these textures with lower quality ones for performance benefits. I would have to scale them up (half assets to scale * 2). However, there are times when I tween the scales on sprites. (tweening to scale 1.5 would have made a sprite larger, it would now make it smaller) A quick way of solving this would be to scale the sprite straight away, and then lock that as the default scale (1) so I wouldn't have to make a large amount of changes. Is this possible? I would prefer to not scale up the textures themselves, as I believe this would have the same performance as using the high resolution textures in the first place. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 5, 2017 Share Posted September 5, 2017 You can use different texture resolution. When you load an image with name like "@.5x.png", pixi detects it automatically. Same for spritesheets made with different packers. Resolution does not affect real size of elements, like if you have 32x32 at resolution 0.5, its the same as 64x64. There are many places where pixi accepts resolution as a parameter, and so far i didnt see complete tutorial on that, you have to study the docs and source code. 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.