Page 1 of 1

Why do my lab tiles have noise in the texture?

Posted: Sun Jan 09, 2022 12:46 am
by sparr
Why do lab tiles render with this weird pattern for me, when they are solid colors in the texture file and other people's screenshots?
Screenshot_2022-01-08_19-45-22.png
Screenshot_2022-01-08_19-45-22.png (5.27 KiB) Viewed 2460 times

Re: Why do my lab tiles have noise in the texture?

Posted: Sun Jan 09, 2022 9:31 am
by posila
My guess is due to low quality texture compression or having full color depth option disabled (neither of which causes this on my end), and due to your particular GPU or graphics driver.

Re: Why do my lab tiles have noise in the texture?

Posted: Sun Jan 09, 2022 5:00 pm
by sparr
Thanks! It was 16 bit color mode. And this prompts further concern.

The actual tile graphics are colors #303030 and #1b1b1b.

In full color mode, in-game, they render as #313031 and #1b1b1b, so the brighter one is already wonky right there and I'd like to know why.

Then in 16-bit mode, I guess I can understand why certain values would dither, and why which values dither would be different between different OSes, drivers, video cards. I'm going to look into that and find out if there are colors less likely to dither, or even that will predictably not dither in particular environments.

Finally, there is pink in the dithering of both colors. Whatever is causing #303030 to convert to #313031 is almost certainly responsible for that on the brighter one, and given that I'd wager a similar process is happening to the #1b1b1b even though it doesn't show up in full color.

I might take this to a more general purpose forum, but I'd love to know if there are Factorio-specific insights / fixes to be had.

Re: Why do my lab tiles have noise in the texture?

Posted: Sun Jan 09, 2022 5:24 pm
by sparr
Based on a screenshot from someone on Discord, the #303030 -> #313031 problem seems to happen across OSes and video card brands. That points me at least a little back in the direction of a Factorio bug?

Re: Why do my lab tiles have noise in the texture?

Posted: Sun Jan 09, 2022 5:40 pm
by posila
Given how GPU texture compression works (https://www.reedbeta.com/blog/understan ... n-formats/) and that we don't do it offline but at startup as fast as possible, #303030 -> #313031 artifact doesn't surprise me.

Re: Why do my lab tiles have noise in the texture?

Posted: Tue Jan 11, 2022 1:38 am
by sparr
So even if I'm using 32-bit color, there's probably still some 16-bit conversion going on during texture compression?

Re: Why do my lab tiles have noise in the texture?

Posted: Tue Jan 11, 2022 1:20 pm
by posila
sparr wrote: Tue Jan 11, 2022 1:38 am So even if I'm using 32-bit color, there's probably still some 16-bit conversion going on during texture compression?
That is correct.