sheep icon indicating copy to clipboard operation
sheep copied to clipboard

Textures overlap

Open pum-purum-pum-pum opened this issue 6 years ago • 8 comments
trafficstars

My texture atlas looks like this in some cases Screenshot from 2019-10-16 17-53-24 Probably it's due to I'm using too big textures(I will write here when I resize them).

pum-purum-pum-pum avatar Oct 16 '19 14:10 pum-purum-pum-pum

That's weird. Can you post the dimensions of the textures you're using, or just post the smallest set of textures the problem can be reproduced with? I'm assuming you're using MAXRECTS?

happenslol avatar Oct 16 '19 20:10 happenslol

imgs_subset.zip MAXRECTS inside my packer(UPD: I meant not sheep's packer, but my cli), yes. The same for simple packer with CLI (checked with bigger max_height max_width too)

dimentions:

(333, 27)
(667, 53)
(267, 267)
(133, 133)
(1333, 1333)
(333, 333)
(267, 267)
(267, 267)

pum-purum-pum-pum avatar Oct 17 '19 21:10 pum-purum-pum-pum

I wrote a function for detecting overlaps a while ago and deleted it for some reason after I squashed my own version of this bug. I'll look into it again tonight

covercash2 avatar Oct 18 '19 01:10 covercash2

Also for MAXRECTS it looks like bins are not working correctly (overlaps are there too both for simple and maxrects) Screenshot from 2019-11-03 21-13-19

pum-purum-pum-pum avatar Nov 03 '19 18:11 pum-purum-pum-pum

Also another bug. I have out of bounds panic error for simple packer on line:

buffer[buffer_idx] = sprite.bytes[sprite_idx];

in sprite.rs Images subset to reproduce out_of_bound.zip

pum-purum-pum-pum avatar Nov 03 '19 18:11 pum-purum-pum-pum

Thanks for documenting those errors! I'll look into it as soon as I have the time (which will probably be around next weekend).

happenslol avatar Nov 03 '19 23:11 happenslol

Ok, thank you! I just made temporal hack with piston's texture packer for myself. Mb someone will find it useful kludge_for_mimic_sheep_api

pum-purum-pum-pum avatar Nov 04 '19 12:11 pum-purum-pum-pum

A temporary workaround would be to use jorgebastida/glue and transform the json it outputs to amethyst structs.

mashedcode avatar May 21 '20 14:05 mashedcode