mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +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() {
|
||||
o_color = texture(sampler2D(t_texture, s_sampler), i_texcoord);
|
||||
|
||||
vec3 cp_lookup = o_color.rgb;
|
||||
cp_lookup *= u_gamma_ramp.in_factor.rgb;
|
||||
cp_lookup += u_gamma_ramp.in_offset.rgb;
|
||||
|
||||
cp_lookup = clamp(
|
||||
cp_lookup * float(CP_COUNT - 1),
|
||||
0.0f, float(CP_COUNT - 1));
|
||||
|
||||
vec3 cp_fpart = fract(cp_lookup);
|
||||
ivec3 cp_index = ivec3(cp_lookup);
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
int cp_entry = cp_index[i];
|
||||
|
||||
float lo = u_gamma_ramp.cp_values[cp_entry + 0][i];
|
||||
float hi = u_gamma_ramp.cp_values[cp_entry + 1][i];
|
||||
|
||||
if (cp_entry == CP_COUNT - 1)
|
||||
hi = lo;
|
||||
|
||||
o_color[i] = mix(lo, hi, cp_fpart[i]);
|
||||
}
|
||||
// vec3 cp_lookup = o_color.rgb;
|
||||
// cp_lookup *= u_gamma_ramp.in_factor.rgb;
|
||||
// cp_lookup += u_gamma_ramp.in_offset.rgb;
|
||||
//
|
||||
// cp_lookup = clamp(
|
||||
// cp_lookup * float(CP_COUNT - 1),
|
||||
// 0.0f, float(CP_COUNT - 1));
|
||||
//
|
||||
// vec3 cp_fpart = fract(cp_lookup);
|
||||
// ivec3 cp_index = ivec3(cp_lookup);
|
||||
//
|
||||
// for (int i = 0; i < 3; i++) {
|
||||
// int cp_entry = cp_index[i];
|
||||
//
|
||||
// float lo = u_gamma_ramp.cp_values[cp_entry + 0][i];
|
||||
// float hi = u_gamma_ramp.cp_values[cp_entry + 1][i];
|
||||
//
|
||||
// if (cp_entry == CP_COUNT - 1)
|
||||
// hi = lo;
|
||||
//
|
||||
// o_color[i] = mix(lo, hi, cp_fpart[i]);
|
||||
// }
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user