Ok but those shaders would never have worked correctly in the past if they’re not compatible with 709?
Shouldn’t those shaders be changed to either have the option to convert to 709 - a straight forward matrix multiply OR create a hdr native version (which turns off the built in inverse tonemapper and hdr10 conversion - see below) and itself take care of the P3-D65 to rec2020 or whatever it wants to do like the Sony Megatron does.
More work for the latter but pretty much six of one half a dozen of the other in terms of end result.
The beauty of exposing these settings to the shaders is that shaders can use them to decide themselves what to do - they can decide what ‘colour boost’ on off should mean. If they need more than on/off then they can add their own parameter and ignore colour boost altogether in the main menu. It does sound in this case that colour boost should be ignored.
The built in HDR inverse tonemapping and hdr10 conversion is really only a band aid to help all the shaders use HDR without the authors having to do work - its not really meant as a proper solution to any one shader.
Just for clarity of implementation all I did was rename the option - its all still expand gamut in the Retroarch source code and does exactly the same thing.
c) Making it possible to turn off scanlines in Megatron like you can in guest-advanced, in which case Megatron would do double duty as the hypothetical “Advanced HDR Options” shader from option b.
We kind of already have that the key is to put:
#pragma format A2B10G10R10_UNORM_PACK32
in the final pass which turns off the internal inverse tonemapper and hdr10 conversion that RetroArch provides and then include:
shaders_slang\hdr\shaders\include\gamma_correct.h
and call:
void GammaCorrect(const vec3 scanline_colour, inout vec3 gamma_corrected)
optionally for the inverse tonemapper they can include:
shaders_slang\hdr\shaders\include\inverse_tonemap.h
and then call:
vec3 InverseTonemap(const vec3 sdr_linear, const float max_nits, const float paper_white_nits)
Im sure Gemini or Chat Jippity can knock a slang together in seconds if pointed at the files.
).
