LIJI32 / SameBoy

Game Boy and Game Boy Color emulator written in C
https://sameboy.github.io/
Other
1.69k stars 211 forks source link

Default color mixing option is far from realistic #292

Open urbster1 opened 4 years ago

urbster1 commented 4 years ago

GBC color mixing does not look at all like the default Sameboy color mixing. Maybe the default option should be Low Contrast?

urbster1 commented 4 years ago

see https://github.com/LIJI32/SameBoy/issues/297 - curious why the default option produces a shade of green that can't be produced on hardware

LIJI32 commented 4 years ago

The default setting is Emulate Hardware in both the SDL version and the Cocoa version. Are you perhaps using the libretro version?

LIJI32 commented 4 years ago

Anyway, to the point of this issue. SameBoy's default setting for all 3 official frontends has been Emulate Hardware for quite some time. If you're a long time user, it's possible that your setting is actually a leftover from before the default was changed.

First, I'll explain how the Emulate Hardware and Reduce Contrast modes were constructed. The Emulate Hardware option was constructed by capturing several photos using a P3-capable camera of one of my CGBs (The one with the best looking screen), and extracting the grey color curve from them. Cross-channel influences were similarly calculated. Then, those values were scaled to fit the sRGB color space, to enhance their contrast while retaining the original color balance. The Reduce Contrast mode is basically Emulate Hardware mode with a somewhat reduced contrast and a tint applied.

Now, it's important to remember that CGB screens differ dramatically between instances (See this Tweet), and are also heavily affected by lighting conditions, so there isn't an "absolute correct" way to emulate that.

There are several reasons why Emulate Hardware is the default over Reduce Contrast:

  1. The most simple reason is that most people, me included, prefer this option over Reduce Contrast.
  2. Similarly to how I don't emulate how the PPU interferes with the speakers to create buzzing sounds or the speaker's static noise, and how the DMG screen has one big vertical "stretch blur" all over the screen, I don't emulate the poor screen quality. See the image below to see a simulated result of a more accurate Reduce Contrast mode; it's not very attractive to look at. The current Reduce Contrast mode was added as an afterthought because very few ROMs, like LSDJ, specifically compensate for the lack of contrast.

For demonstration: Top left is without color correction, top right is "Emulate Hardware", bottom left is "Reduce Contrast", bottom right is a more accurate, but not very pleasant version of "Reduce Contrast".

image
jkotlinski commented 4 years ago

Thank you for enabling color correction by default - the top left option does not at all look like Game Boy, and I think it is good to keep things somewhat authentic. Otherwise people can just as well use Pico8 or any other fantasy platform.

Can I turn this into a new feature request? Add the bottom right color correction as a new "Reality" setting? I and many others like to make palettes, then it is incredibly useful to proof with extreme settings. Sometimes you want palettes that work in any condition.

jkotlinski commented 3 years ago

Probably this issue can be closed now, with the "Harsh Reality" option?