dragonshade Posted July 19, 2016 Share Posted July 19, 2016 so I have a 2x128 vertical gradient, I do that to reduce the spritesheet size. What I want is to stretch the sprite to 64x128. When I created a sprite out of it, I notice it having a weird incorrect width. When I do, sprite.width = 64, it doesn't go to 64 px. And when I use a huge number to force it to 64px on screen, it uses the wrong sampling where it tries to interpolate the pixel across the x direction using the pixel above and below. How can I resolve this ? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 19, 2016 Share Posted July 19, 2016 Use TilingSprite instead. Also, you may have scaled the parents of the sprite, if its not 64px on screen Quote Link to comment Share on other sites More sharing options...
dragonshade Posted July 20, 2016 Author Share Posted July 20, 2016 19 hours ago, ivan.popelyshev said: Use TilingSprite instead. Also, you may have scaled the parents of the sprite, if its not 64px on screen I am not sure how to use TilingSprite and what it does. In this case, would it be new TilingSprite(my2x128Texture, 64, 128) ? 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.