diff options
author | Graham Linden <graham@lindenlab.com> | 2019-07-23 11:36:22 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-07-23 11:36:22 -0700 |
commit | b507d63566e8896af702dd10f5643dc29068a8a9 (patch) | |
tree | 2fe8accc9802ad35364cd39b6e74efde0d7e0cfd /indra/newview/app_settings/shaders/class1 | |
parent | 230c9b68d81bcf163a6627e8474e545e8ceb2282 (diff) |
SL-11621
Remove all references to unused shader var global_gamma.
Remove many unused decls for gamma from shaders.
Make post-deferred gamma correction use display_gamma.
Make setting display_gamma use the correct RenderDeferredDisplayGamma setting.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
7 files changed, 1 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 0c4707098b..546a502ee1 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -37,10 +37,7 @@ out vec4 frag_color; #define frag_color gl_FragColor #endif -uniform float display_gamma; -uniform vec4 gamma; uniform mat3 env_mat; - uniform vec3 sun_dir; uniform vec3 moon_dir; diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl index f6694aae2a..ae1ac5de7f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl @@ -43,7 +43,6 @@ uniform sampler2D cloud_noise_texture_next; uniform float blend_factor; uniform vec4 cloud_pos_density1; uniform vec4 cloud_pos_density2; -uniform vec4 gamma; uniform float cloud_scale; uniform float cloud_variance; diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 38792601f6..a13c8de43e 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -31,7 +31,6 @@ #define DIFFUSE_ALPHA_MODE_EMISSIVE 3 uniform float emissive_brightness; -uniform float display_gamma; uniform int sun_up_factor; #ifdef WATER_FOG @@ -64,8 +63,6 @@ uniform sampler2D lightFunc; // Inputs uniform vec4 morphFactor; uniform vec3 camPosLocal; -//uniform vec4 camPosWorld; -uniform vec4 gamma; uniform mat3 env_mat; uniform vec3 sun_dir; diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl index 058e939ec8..9f519708a2 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl @@ -37,7 +37,6 @@ uniform sampler2DRect diffuseRect; uniform vec2 screen_res; VARYING vec2 vary_fragcoord; - uniform float display_gamma; vec3 linear_to_srgb(vec3 cl); @@ -45,7 +44,7 @@ vec3 linear_to_srgb(vec3 cl); void main() { vec4 diff = texture2DRect(diffuseRect, vary_fragcoord); - diff.rgb = linear_to_srgb(diff.rgb); + diff.rgb = pow(diff.rgb, vec3(display_gamma)); frag_color = diff; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl index 65e4fdf17f..331249dc33 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl @@ -37,8 +37,6 @@ out vec4 frag_data[3]; VARYING vec4 vary_HazeColor; -uniform vec4 gamma; - /// Soft clips the light with a gamma correction vec3 scaleSoftClip(vec3 light); vec3 srgb_to_linear(vec3 c); diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl index 0607ea8bc5..4460ef905b 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl @@ -22,7 +22,6 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -uniform vec4 gamma; uniform vec4 lightnorm; uniform vec4 sunlight_color; uniform vec4 moonlight_color; diff --git a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl index 346634af33..fc51e81177 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl @@ -24,7 +24,6 @@ */ uniform int no_atmo; -uniform vec4 gamma; vec3 scaleSoftClipFrag(vec3 light) { |