Crt shaders with bluish blacks

While searching for pictures of real Sony PVM monitors I found this one where you can clearly see that black pixels are not really black :

source : ancientelectronics.wordpress.com/tag/pvm/

So I’ve modified both crt-hylian and crt-easymode to give them bluish blacks :

crt-easymode modified : http://pastebin.com/fK73uUFx

crt-hyllian modified : http://pastebin.com/mXgJLxgq

reference image :

I’ve only added this in crt-hyllian :

    // brighten black pixels //
    color.b += 0.18;
    color.g += 0.07;
    color.r += 0.07;

Of course these values are added to all colors, so in theory some of the brightest colors will be rendered almost white. Would it be possible to modify only the darkest colors (graph n°2) instead of all the pixels (graph n°1) ?

Some more screenshots with crt-easymode (wich has very low gpu usage) to show you how it looks :

This gives a blue glow to the screen wich for me looks a lot better than pure black, what do you think ? Would you (shader authors) consider adding this option to your crt shaders ?

I know Hyllian’s mentioned the blue thing before and he even added some #defines for it, though I believe his only affects colors > 0.0, whereas your approach brightens blacks into having a blue tint.

Indeed there is a CRT_TV_BLUE_TINT (>1) variable in crt-hyllian :

    color.b *= CRT_TV_BLUE_TINT;

So when color.b is 0 the result is still 0.

What I’m doing is adding instead of multiplying :

    color.b += 0.18;

But to only affect darker pixels (as in graph N°2) I think it should be something like this :

    color.b += 0.18 * (1 - color.b / colmax) ^ n;

where colmax is the max value for color.b (which I didn’t figure out, maybe it’s 1, I don’t know). I have yet to try this (although I think it already looks good as it is).

EDIT : I’ve modified crt-hyllian with this :

    color.b += 0.14 * pow(1 - color.b, 2);
    color.g += 0.04 * pow(1 - color.g, 2);
    color.r += 0.04 * pow(1 - color.r, 2);

Same thing with crt-easymode, I think it works as intended :

crt-easymode modified : http://pastebin.com/heKK0PcG crt-hyllian modified : http://pastebin.com/RgunP9it

1 Like