mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxgi] Disable gamma curve in presenter
Causes regressions in many games for unknown reasons.
This commit is contained in:
parent
021ea64103
commit
2f7dcd2caf
@ -18,26 +18,26 @@ layout(location = 0) out vec4 o_color;
|
|||||||
void main() {
|
void main() {
|
||||||
o_color = texture(sampler2D(t_texture, s_sampler), i_texcoord);
|
o_color = texture(sampler2D(t_texture, s_sampler), i_texcoord);
|
||||||
|
|
||||||
vec3 cp_lookup = o_color.rgb;
|
// vec3 cp_lookup = o_color.rgb;
|
||||||
cp_lookup *= u_gamma_ramp.in_factor.rgb;
|
// cp_lookup *= u_gamma_ramp.in_factor.rgb;
|
||||||
cp_lookup += u_gamma_ramp.in_offset.rgb;
|
// cp_lookup += u_gamma_ramp.in_offset.rgb;
|
||||||
|
//
|
||||||
cp_lookup = clamp(
|
// cp_lookup = clamp(
|
||||||
cp_lookup * float(CP_COUNT - 1),
|
// cp_lookup * float(CP_COUNT - 1),
|
||||||
0.0f, float(CP_COUNT - 1));
|
// 0.0f, float(CP_COUNT - 1));
|
||||||
|
//
|
||||||
vec3 cp_fpart = fract(cp_lookup);
|
// vec3 cp_fpart = fract(cp_lookup);
|
||||||
ivec3 cp_index = ivec3(cp_lookup);
|
// ivec3 cp_index = ivec3(cp_lookup);
|
||||||
|
//
|
||||||
for (int i = 0; i < 3; i++) {
|
// for (int i = 0; i < 3; i++) {
|
||||||
int cp_entry = cp_index[i];
|
// int cp_entry = cp_index[i];
|
||||||
|
//
|
||||||
float lo = u_gamma_ramp.cp_values[cp_entry + 0][i];
|
// float lo = u_gamma_ramp.cp_values[cp_entry + 0][i];
|
||||||
float hi = u_gamma_ramp.cp_values[cp_entry + 1][i];
|
// float hi = u_gamma_ramp.cp_values[cp_entry + 1][i];
|
||||||
|
//
|
||||||
if (cp_entry == CP_COUNT - 1)
|
// if (cp_entry == CP_COUNT - 1)
|
||||||
hi = lo;
|
// hi = lo;
|
||||||
|
//
|
||||||
o_color[i] = mix(lo, hi, cp_fpart[i]);
|
// o_color[i] = mix(lo, hi, cp_fpart[i]);
|
||||||
}
|
// }
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user