From d5ba7bb70ef327c8856165475b58e946c8fbd8ce Mon Sep 17 00:00:00 2001 From: SmileTheory Date: Mon, 1 Feb 2016 21:37:23 -0800 Subject: OpenGL2: Merge several cvars into r_pbr. r_glossIsRoughness, r_specularIsMetallic, r_framebufferGamma, r_tonemapGamma, r_materialGamma, r_lightGamma --- src/renderergl2/glsl/calclevels4x_fp.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/renderergl2/glsl/calclevels4x_fp.glsl') diff --git a/src/renderergl2/glsl/calclevels4x_fp.glsl b/src/renderergl2/glsl/calclevels4x_fp.glsl index 1de59e9f..0d298b62 100644 --- a/src/renderergl2/glsl/calclevels4x_fp.glsl +++ b/src/renderergl2/glsl/calclevels4x_fp.glsl @@ -14,8 +14,8 @@ vec3 GetValues(vec2 offset, vec3 current) #ifdef FIRST_PASS - #if defined(r_framebufferGamma) - minAvgMax = pow(minAvgMax, vec3(r_framebufferGamma)); + #if defined(USE_PBR) + minAvgMax = pow(minAvgMax, vec3(2.2)); #endif float lumi = max(dot(LUMINANCE_VECTOR, minAvgMax), 0.000001); -- cgit From fdf6b74c210f7cc1fd54472308fc61c9341c4de1 Mon Sep 17 00:00:00 2001 From: SmileTheory Date: Wed, 17 Feb 2016 20:06:18 -0800 Subject: OpenGL2: Shader optimization, and add dither to tonemap. --- src/renderergl2/glsl/calclevels4x_fp.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/renderergl2/glsl/calclevels4x_fp.glsl') diff --git a/src/renderergl2/glsl/calclevels4x_fp.glsl b/src/renderergl2/glsl/calclevels4x_fp.glsl index 0d298b62..8246c4b3 100644 --- a/src/renderergl2/glsl/calclevels4x_fp.glsl +++ b/src/renderergl2/glsl/calclevels4x_fp.glsl @@ -15,7 +15,7 @@ vec3 GetValues(vec2 offset, vec3 current) #ifdef FIRST_PASS #if defined(USE_PBR) - minAvgMax = pow(minAvgMax, vec3(2.2)); + minAvgMax *= minAvgMax; #endif float lumi = max(dot(LUMINANCE_VECTOR, minAvgMax), 0.000001); -- cgit