1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00
OpenMW/files/data/shaders/adjustments.omwfx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
828 B
Plaintext
Raw Normal View History

2022-05-14 01:58:00 +00:00
uniform_float uGamma {
default = 1.0;
step = 0.01;
min = 0.0;
max = 5.0;
2022-12-22 17:53:49 +00:00
display_name = "#{OMWShaders:GammaLevelName}";
description = "#{OMWShaders:GammaLevelDescription}";
2022-05-14 01:58:00 +00:00
}
uniform_float uContrast {
default = 1.0;
step = 0.01;
min = 0.0;
max = 5.0;
2022-12-22 17:53:49 +00:00
display_name = "#{OMWShaders:ContrastLevelName}";
description = "#{OMWShaders:ContrastLevelDescription}";
2022-05-14 01:58:00 +00:00
}
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 {
2022-12-22 17:53:49 +00:00
description = "#{OMWShaders:AdjustmentsDescription}";
2022-05-14 01:58:00 +00:00
version = "1.0";
author = "OpenMW";
passes = main;
}