Here is a mod which shows two test sprites. The source images are identical, but one has no-crop.
download/file.php?id=46352
This is what it looks like in 0.17.14:
Since 0.17.15 both sprites are missing the zero alpha section. This seems to indicate that cropping is happening even with the no-crop flag, and that it is still removing pixels with non-zero colour values.
I expect both sprites to be showing both halves, since one should be cropping only transparent black pixels, and the other shouldn’t be cropping anything.
Cropping, no-crop, not working as expected
-
- Long Handed Inserter
- Posts: 93
- Joined: Thu May 18, 2017 2:22 pm
- Contact:
Re: Cropping, no-crop, not working as expected
Hey, I am sorry I haven't get back to you on this one yet.
no-crop works, I think this is result of texture compression in atlases ... I think your original workaround of leaving alpha at small non zero value should work for time being.
no-crop works, I think this is result of texture compression in atlases ... I think your original workaround of leaving alpha at small non zero value should work for time being.
-
- Long Handed Inserter
- Posts: 93
- Joined: Thu May 18, 2017 2:22 pm
- Contact:
Re: Cropping, no-crop, not working as expected
Thanks, I was just making sure the issue didn’t get lost. I’m in no hurry: I doubt overdraw is my bottleneck at the moment.
Can you explain what you think is happening with texture compression?
Can you explain what you think is happening with texture compression?
Re: Cropping, no-crop, not working as expected
In short, shader for GPU accelerated texture compression does conversion from sRGB to linear color space and it assumes textures are premultiplied, so it un-premultiplies color, does sRGB->linear conversion and premultiplies it back. This is done on entire atlas (big par of atlas) without any awareness of individual sprites.danielbrauer wrote: ↑Fri Apr 05, 2019 10:45 amCan you explain what you think is happening with texture compression?