Cropping, no-crop, not working as expected

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Post Reply
danielbrauer
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Thu May 18, 2017 2:22 pm
Contact:

Cropping, no-crop, not working as expected

Post by danielbrauer »

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:

Image

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.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Cropping, no-crop, not working as expected

Post by posila »

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.

danielbrauer
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Thu May 18, 2017 2:22 pm
Contact:

Re: Cropping, no-crop, not working as expected

Post by danielbrauer »

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?

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Cropping, no-crop, not working as expected

Post by posila »

danielbrauer wrote:
Fri Apr 05, 2019 10:45 am
Can you explain what you think is happening with texture compression?
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.

Post Reply

Return to “Minor issues”