Timeline for Libgdx Texture Sides Are Cropped Automatically for Seemingly No Reason
Current License: CC BY-SA 3.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 29, 2019 at 19:21 | comment | added | DMGregory♦ | I see this thread is old, but for the record: yes, scaling your sprites can produce this artifact. A 1px transparent border at 180x180 becomes 2/9ths of a pixel at 40x40, ie. it rounds to nothing. Depending on your scaling/filtering method, you might skip drawing several rows of texels at the edge of your texture, leading to a sharp cutoff, or average several rows of texels, producing a row of output that's more opaque/wider than the very edge in your source. This is one of the reasons we generally recommend drawing your sprites at their native resolution. | |
Jan 27, 2018 at 20:41 | comment | added | hellgasm | I tried adding 1px transparent borders to my textures but it's still not fixed. My original texture is 180x180 px. I resize it to 40x40. Maybe this is the reason? | |
Jan 27, 2018 at 4:50 | history | answered | Stephane Hockenhull | CC BY-SA 3.0 |