From 6ac20aea81a227ca8369eeac3c3b663c0c5b9fdb Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Sun, 25 Jun 2023 20:28:04 -0500 Subject: [PATCH] Video: Fix shaders on OpenGL 4.1 --- Data/Sys/Shaders/default_pre_post_process.glsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Data/Sys/Shaders/default_pre_post_process.glsl b/Data/Sys/Shaders/default_pre_post_process.glsl index d802f10bff..58ed50d53c 100644 --- a/Data/Sys/Shaders/default_pre_post_process.glsl +++ b/Data/Sys/Shaders/default_pre_post_process.glsl @@ -46,7 +46,7 @@ void main() float4 color = Sample(); // Convert to linear space to do any other kind of operation - color.rgb = pow(color.rgb, game_gamma.xxx); + color.rgb = pow(color.rgb, float3(game_gamma)); if (OptionEnabled(correct_color_space)) { @@ -60,7 +60,7 @@ void main() if (OptionEnabled(hdr_output)) { - const float hdr_paper_white = hdr_paper_white_nits / hdr_sdr_white_nits; + float hdr_paper_white = hdr_paper_white_nits / hdr_sdr_white_nits; color.rgb *= hdr_paper_white; } @@ -74,12 +74,12 @@ void main() if (OptionEnabled(sdr_display_gamma_sRGB)) color.rgb = LinearTosRGBGamma(color.rgb); else - color.rgb = pow(color.rgb, (1.0 / sdr_display_custom_gamma).xxx); + color.rgb = pow(color.rgb, float3(1.0 / sdr_display_custom_gamma)); } // Restore the original gamma without changes else { - color.rgb = pow(color.rgb, (1.0 / game_gamma).xxx); + color.rgb = pow(color.rgb, float3(1.0 / game_gamma)); } SetOutput(color);