2022-05-14 01:58:00 +00:00
|
|
|
main_pass {
|
|
|
|
wrap_s = clamp_to_edge;
|
|
|
|
wrap_t = clamp_to_edge;
|
|
|
|
internal_format = rgba;
|
|
|
|
source_type = unsigned_int;
|
|
|
|
source_format = rgba;
|
|
|
|
}
|
|
|
|
|
|
|
|
uniform_float uGamma {
|
|
|
|
default = 1.0;
|
|
|
|
step = 0.01;
|
|
|
|
min = 0.0;
|
|
|
|
max = 5.0;
|
2022-07-24 13:18:50 +00:00
|
|
|
display_name = "#{PostProcessing:GammaLevelName}";
|
|
|
|
description = "#{PostProcessing: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-07-24 13:18:50 +00:00
|
|
|
display_name = "#{PostProcessing:ContrastLevelName}";
|
|
|
|
description = "#{PostProcessing: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-07-24 13:18:50 +00:00
|
|
|
description = "#{PostProcessing:MainPassDescription}";
|
2022-05-14 01:58:00 +00:00
|
|
|
version = "1.0";
|
|
|
|
author = "OpenMW";
|
|
|
|
passes = main;
|
|
|
|
hdr = false;
|
|
|
|
}
|