bsnes-plus icon indicating copy to clipboard operation
bsnes-plus copied to clipboard

Possibly Incorrect NTSC TV Gamma Ramp Adjustment

Open torridgristle opened this issue 5 years ago • 5 comments

The NTSC TV Gamma Ramp adjustment appears to apply a gamma curve to the lower half of the RGB range.

Disabled https://i.imgur.com/hKQVzRT.png Enabled https://i.imgur.com/3XhvdUd.png

Change between the white section mapped as a curve adjustment https://i.imgur.com/4m0BOgp.png

torridgristle avatar Oct 24 '18 22:10 torridgristle

Here's a 1D look up table for displaying 2.5 gamma on sRGB. https://mega.nz/#!hp1TzYxJ!l7tYoXShTVDxNfbWlz3v0ehZVTrD7Uu4HBMzR6EjYeY

The values were generated with DisplayCal using the actual sRGB tone curve with the linear blacks and non-constant gamma rather than a single number approximation so it should be as accurate as you could hope.

torridgristle avatar Oct 24 '18 22:10 torridgristle

How does the same thing currently look in higan? It uses the same curve with the fully linear upper half (for some reason; I have no idea what it's based on) but seems to apply the actual values differently.

devinacker avatar Oct 25 '18 00:10 devinacker

It appears to be the same in Higan v106.

Color Emulation Enabled https://i.imgur.com/oqsRSD7.png Color Emulation Disabled https://i.imgur.com/KoQE5Cg.png

It's such a strange curve unlike anything I've seen regarding display emulation that unless Byuu explains it I'm firmly of the opinion that a mistake was made somewhere. A normal gamma curve what exists only in the bottom half screams typo to me, like one less bitshift than intended or something.

torridgristle avatar Oct 25 '18 00:10 torridgristle

It definitely looks deliberate (the gamma curve is just a lookup table for the 5-bit color components), so I'm as stumped as you are. I guess I can try to find out what the deal is or if there's an old forum post talking about it or something.

devinacker avatar Oct 25 '18 03:10 devinacker

Finally got around to asking byuu about it, and it turns out that the curve was actually originally designed by Overload for Super Sleuth and kept just because it looked good, but I assume that the linear upper half was intentional either way.

I might add some alternate LUT options or something in the future, not sure yet.

devinacker avatar Mar 08 '19 02:03 devinacker