mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 12:01:51 +00:00
39 lines
828 B
Plaintext
39 lines
828 B
Plaintext
uniform_float uGamma {
|
|
default = 1.0;
|
|
step = 0.01;
|
|
min = 0.0;
|
|
max = 5.0;
|
|
display_name = "#{OMWShaders:GammaLevelName}";
|
|
description = "#{OMWShaders:GammaLevelDescription}";
|
|
}
|
|
|
|
uniform_float uContrast {
|
|
default = 1.0;
|
|
step = 0.01;
|
|
min = 0.0;
|
|
max = 5.0;
|
|
display_name = "#{OMWShaders:ContrastLevelName}";
|
|
description = "#{OMWShaders:ContrastLevelDescription}";
|
|
}
|
|
|
|
fragment main {
|
|
|
|
omw_In vec2 omw_TexCoord;
|
|
|
|
void main()
|
|
{
|
|
vec4 color = omw_GetLastShader(omw_TexCoord);
|
|
color.rgb = (color.rgb - vec3(0.5)) * uContrast + 0.5;
|
|
color.rgb = pow(color.rgb, vec3(1.0 / uGamma));
|
|
|
|
omw_FragColor = color;
|
|
}
|
|
}
|
|
|
|
technique {
|
|
description = "#{OMWShaders:AdjustmentsDescription}";
|
|
version = "1.0";
|
|
author = "OpenMW";
|
|
passes = main;
|
|
}
|