Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to turn off color correction #1672

Open
RetroMoi opened this issue Jan 14, 2025 · 5 comments
Open

Ability to turn off color correction #1672

RetroMoi opened this issue Jan 14, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@RetroMoi
Copy link

The default color palette handler presumes we’re using the BGB emulator and compensates for the colors chosen, which may not be a true-to-all-cases solution.
This results in oversaturated colors on some devices that do not use that method of color correction, and it looks jarring.

It would be nice to be able to toggle it on or off, so as to adapt to different options (IPS screen GBC or even emulators), depending on each use case.

@RetroMoi RetroMoi added the enhancement New feature or request label Jan 14, 2025
@drayzee213
Copy link

drayzee213 commented Jan 16, 2025

yes please, I just wanted to add that looking at issue #341 might help:
#341

the code that color corrects bgb output:

const rgbToGBCHex = (red, green, blue) => {
  const value = (blue << 10) + (green << 5) + red;
  const r = value & 0x1f;
  const g = (value >> 5) & 0x1f;
  const b = (value >> 10) & 0x1f;
  return (
    (((r * 13 + g * 2 + b) >> 1) << 16) |
    ((g * 3 + b) << 9) |
    ((r * 3 + g * 2 + b * 11) >> 1)
  ).toString(16).padStart(6, "0");
}; 

this makes the rom look like on "original screen" and is reverse engineered in GB Studio, to make colors in the editor look like the later output in bgb.

Problem: in reality the colors on the rom are way more saturated -> playing on any other emulator than bgb, or on original hardware with ips screens will show colors that are way off.

image

either make the implemented bgb emulator without this color correction or provide an option to turn it off in the editor.
We want to make games played on hardware like emulator handhelds, FPGBC, AP or modded GBC, please.

thank you!

@nielsderijk
Copy link

nielsderijk commented Jan 16, 2025

@chrismaltby I would also love it if this got some attention. It’s now super hard to see how your game will look on a FPGA/modded LCD screen (or even original hardware).

Even though I know each screen will display colors differently, I find myself going back to my palettes constantly to adjust for oversaturated colors. The BGB corrections are just too far off.

@KirbyKing186
Copy link

Having an unfiltered color option would be amazing!

I mentioned here that binjgb can be configured to have uncorrected colors, however it’d most likely require recompiling GB Studio. Although I’m sure how to turn off the color-correction within GB Studio’s interface, you can see more about configuring binjgb here:

#1434

@maxoakland
Copy link

I also think this would be a huge improvement. It's really hard to get colors right because of the uncommon color correction. I use Sameboy because it's the most accurate Gameboy emulator and there's no way to get it to look similar to BGB's correction

@chrismaltby
Copy link
Owner

Cool, I agree this would be useful. I've just started working on a branch that adds a setting to disable the inbuilt color correction (both in the IDE preview and the the emulator)

Once builds are finished (assuming no issues) you should be able to try this version here:
https://github.com/chrismaltby/gb-studio/actions/runs/12868730079

There might be a few edge case issues to pick up but once I'm happy with this will merge and the feature should be included in the next release :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants