GTUv050 Glsl Shader Parameter?!

Hi✌

Maybe someone could help me setting the black level to 0 in the gtuv050 glsl shader?

I use this shader on my nvidia shield Android tv box. Its a really nice shader for snes games but really too dark.

Retroarch Android cant set Parameter in glsl shader and i dont unterstand the code when im open the shader in word.

Plz help me :+1:

Greetz

That variable only shows up in the pass3 shader, down at the very end. From the Cg version:

tempColor-=float3(blackLevel);
tempColor*=(contrast/float3(1.0-blackLevel));

the cg2glsl script hardcodes the variables, so blackLevel becomes 0.0875 (or, in scientific notation: 8.75 * 10^-2) and contrast becomes 1.0, making the GLSL equivalent:

_tempColor = _tempColor - vec3( 8.74999985E-02, 8.74999985E-02, 8.74999985E-02);
_tempColor = _tempColor*vec3( 1.09589040E+00, 1.09589040E+00, 1.09589040E+00);

If you change the blackLevel to 0.0, the first line becomes:

_tempColor = _tempColor - vec3(0.0, 0.0, 0.0);

and the second line becomes:

_tempColor = _tempColor * (1.0 - vec3(0.0, 0.0, 0.0));

You’ll notice that these both simplify to ‘_tempColor = _tempColor’, so you should be able to just delete both of them. :slight_smile:

Thank you alot! :grinning:

I Try this after work :ok_hand: