Just finally getting around to testing this now. As mentioned, it totally got lost in the shuffle x.x
I added a menu option to my personal testing build to toggle the clamp on and off, and a difference in color rendition is visible by both my eyes and a friend’s. We both independently came to the conclusion that having the clamp enabled results in colors more similar to the colors seen with shaders turned off, but to be certain, someone with a colorimeter will need to check.
Unfortunately, the “0.000001”/6-decimal version of the clamp does not round down to zero black, at least on my C1.
scanline_colour = clamp(scanline_colour, vec3(0.0000001f), vec3(1.0f));
rounds down to zero black, at the cost of allowing some overshoot back in. I used this modified version of the clamp for the color comparisons, but by my eyes, colors are identical with the 0.0000001/7-decimal and 0.000001/6-decimal versions.
crt-sony-megatron.slang modifications for Gamut Overshoot Fix parameter
(...)
// User Settings
(...)
float hcrt_scanline_colour_clamp;
(...)
#include "include/parameters.h"
(...)
#define HCRT_SCANLINE_COLOUR_CLAMP params.hcrt_scanline_colour_clamp
(...)
scanline_colour += scanline_channel_2 * kColourMask[channel_2];
}
if(HCRT_SCANLINE_COLOUR_CLAMP >= 1.0f)
{
if(HCRT_SCANLINE_COLOUR_CLAMP == 1.0f)
{
// scanline_colour = clamp(scanline_colour, vec3(0.000000132362252f), vec3(1.0f));
scanline_colour = clamp(scanline_colour, vec3(0.0000001f), vec3(1.0f));
}
else if(HCRT_SCANLINE_COLOUR_CLAMP == 2.0f)
{
scanline_colour = clamp(scanline_colour, vec3(0.000001f), vec3(1.0f));
}
}
vec3 transformed_colour;
if(HCRT_COLOUR_ACCURATE >= 1.0f)
(...)
and
#pragma parameter hcrt_scanline_colour_clamp " Gamut Overshoot Fix" 1.0 0.0 2.0 1.0
somewhere in parameters.h.
Gamut Overshoot Fix 0=no fix, 1=the 7-decimal clamp, 2=the 6-decimal clamp.