Dogway's grading shader (slang)

I assume that the monitor LUT box maps sRGB to display gamut, so you need to output sRGB from the shader which defeats the purpose of computing everything in grade in your display space.

In my opinion it’s better to have 100% control of gamut mapping, that means the ideal scenario is to use a calibrated monitor with a wide gamut and use a custom matrix transform from XYZ to your display gamut so all the operations within grade perform in that wider gamut. This is better than calibrating to SMPTE-C at least for grade, and since you are expanding (not compressing) you run into less mapping issues.

If you insist on SMPTE on step 3 you can also use the SMPTE-C matrix given your calibration is good enough.

sRGB is a standard, like the SMPTE. P22 is more the average of consumer’s CRT color response thus I swapped those recently. It’s worth it if currently you can see differences in those gamuts and consider them worthy I guess.

2 Likes

Presumably if one’s display is calibrated to Rec709, bypass is the best option (default settings?)

1 Like

Yes, sRGB as Display Color Space.

1 Like

@Dogway

Was wondering if you had any suggestions specifically for NES, I find that a lower CRT gamma “looks right” for this system, like 2.20 or 2.25. What do you think?

1 Like

There’s so much good info in this thread, thanks @Dogway, @Rafan, @Syh and @c9f5fdda06 for a great discussion.

3 Likes

Yes, I found that too, as well as temperature using a lower kelvin around 8000. These are my NES settings, later I do some artistic things with color mangler though.

g_gamma_in = "2.222000"
g_signal_type = "1.000000"
g_gamma_type = "1.000000"
g_crtgamut = "2.000000"
g_space_out = "-1.000000"
g_hue_degrees = "0.000000"
g_I_SHIFT = "0.000000"
g_Q_SHIFT = "0.000000"
g_I_MUL = "0.707107"
g_Q_MUL = "0.707107"
wp_temperature = "8205.000000"
1 Like

Are you saying you use color mangler on top of grade or that you are using the color mangler section of grade?

1 Like

Yes that’s it, the color mangler portion of grade. Even if use a custom matrix transform for my display I further adjust greens and blues.

1 Like

How are you guys seeing this? Just by eyeballing it?

What I find odd is that I can’t remember changing TV settings back in the day depending whether SNES or NES was connected… Is changing the gamma per emulated system a shortcoming of the shader? Or is it the way the emulator author is emulating things that this gamma adjustment per system is needed?

1 Like

Yeah well said.

Big shout out also to @Dogway for his great grade shader (can’t do without it anymore!) and @Nesguy and the others for discussing and finetuning stuff!

2 Likes

Pretty much :stuck_out_tongue:

I had a large-ish collection of NES games back in the day, for what that’s worth.

Different consoles had different integrated circuits that processed images in different ways, and none of that is actually emulated, so you have to recreate it with shaders. This is a really bad explanation, sorry. Maybe someone with more technical knowledge can give a better answer.

1 Like

Just a heads up for anyone looking, the shader is now in the official repository both slang and glsl in the misc folder ` 0 ´

6 Likes

This is a first impression, but after some tests I think that the guest’s LUT shader could be wrong parsing the tone response curve. I still have to test against official Reshade over Retroarch which I have never done.

1 Like

Ok, I took the plunge and tested with Reshade.

Original

Reshade LUT_guest (grade’s implementation is older/different)

BTW nevermind, LUT_guest uses a depth of 32 internally, changed that to 64 and it works fine. Guess I need to update grade’s LUT with the new guest’s LUT.

3 Likes

I updated grade in my repo to sync with updated LUT shader.

It’s much better, but still it doesn’t mimic what Reshade does which is the correct look.

Source

Reshade

LUT_guest (does a D65 to D50 apparently)

Sonic The Hedgehog (Japan, Korea)-200627-152618 LUT_guest

LUT_grade (new)

RA Reshade LUT

3 Likes

Could you possibly use ra reshade LUT as reference?

2 Likes

I updated the post with new synced images. Added RA reshade port and that one looks correct, so I will implement that one over to grade. Thanks for the note!

2 Likes

Np, I just saw you saying that Reshades LUT implementation was more accurate and knew RA had a ReShade LUT port so figured I’d suggest it.

Have a good weekend!

1 Like

Just to add, it’s not a matter of like more or not. I’m comparing its behavior with color managed software, and only the Reshade port shader matches those.

1 Like

Yeah, it was poorly worded on my end, just woke up lol.

Fixed it, lol.

1 Like