The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended bug reports => Topic started by: nrg on September 21, 2020, 07:54:57 AM

Title: Player colors and transparency
Post by: nrg on September 21, 2020, 07:54:57 AM
While trying to figure out why the player colors didn't seem to be working on a bus stop I made, I put together a quick png test image (attached).  This has each shade of the primary player color on the left and the secondary on the right, decreasing in opacity as you go away from the center.  As you can see the transparent colors are sometimes way off.  This happens with every combination of colors.
Title: Re: Player colors and transparency
Post by: jamespetts on September 22, 2020, 10:46:44 AM
Thank you for your report.

The code for player colour transparency (and graphics generally) is unaltered from Standard and is not a part of the code that I know anything about. However, if I understand correctly, I believe that this is a general issue with transparency, not just in Simutrans, but in a large proportion of computer graphics using colour blending of various kinds: see here (https://www.youtube.com/watch?v=LKnqECcg6Gw) for details.
Title: Re: Player colors and transparency
Post by: kierongreen on September 22, 2020, 08:34:02 PM
This was picked up when transparency was introduced. The difficulty is that having gamma correction would be potentially much slower, and with only 15 bit images gains in accuracy wouldn't necessarily be huge. Hence simple averages had been (largely) felt to be good enough.