diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
6 files changed, 10 insertions, 30 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index 359864556d..12706f130b 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -149,7 +149,6 @@ void main() } vec4 diff = diffuseLookup(vary_texcoord0.xy); - diff.rgb = pow(diff.rgb, vec3(2.2)); vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, vertex_color.a); vec4 color = diff * col; diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl index 695887c5ff..5621e47ab7 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl @@ -71,8 +71,6 @@ vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod) { vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = pow(ret.rgb, vec3(2.2)); - vec2 dist = tc-vec2(0.5); float det = max(1.0-lod/(proj_lod*0.5), 0.0); @@ -88,8 +86,6 @@ vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod) { vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = pow(ret.rgb, vec3(2.2)); - vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); float det = min(lod/(proj_lod*0.5), 1.0); @@ -107,8 +103,6 @@ vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod) { vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = pow(ret.rgb, vec3(2.2)); - vec2 dist = tc-vec2(0.5); float d = dot(dist,dist); diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index e95991a635..ff20b63972 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -79,11 +79,6 @@ vec3 vary_AmblitColor; vec3 vary_AdditiveColor; vec3 vary_AtmosAttenuation; -vec3 samplesRGB(vec3 color) -{ - return pow(color, vec3(2.2)); -} - vec4 getPosition_d(vec2 pos_screen, float depth) { vec2 sc = pos_screen.xy*2.0; @@ -108,15 +103,15 @@ vec3 getPositionEye() } vec3 getSunlitColor() { - return samplesRGB(vary_SunlitColor) * 4.4; + return vary_SunlitColor; } vec3 getAmblitColor() { - return samplesRGB(vary_AmblitColor) * 2.2; + return vary_AmblitColor; } vec3 getAdditiveColor() { - return samplesRGB(vary_AdditiveColor) * 2.2; + return vary_AdditiveColor; } vec3 getAtmosAttenuation() { @@ -314,7 +309,7 @@ void main() // vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz)); float sa = dot(refnormpersp, sun_dir.xyz); - vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*(texture2D(lightFunc, vec2(sa, spec.a)).r); + vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*(6 * texture2D(lightFunc, vec2(sa, spec.a)).r); // add the two types of shiny together vec3 spec_contrib = dumbshiny * spec.rgb; @@ -323,7 +318,7 @@ void main() //add environmentmap vec3 env_vec = env_mat * refnormpersp; - col = mix(col.rgb, samplesRGB(textureCube(environmentMap, env_vec).rgb) * 2.2, + col = mix(col.rgb, textureCube(environmentMap, env_vec).rgb, max(norm.a-diffuse.a*2.0, 0.0)); } diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl index 525dd32106..6d6ad6d565 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl @@ -71,8 +71,6 @@ vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod) { vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = pow(ret.rgb, vec3(2.2)); - vec2 dist = tc-vec2(0.5); float det = max(1.0-lod/(proj_lod*0.5), 0.0); @@ -88,8 +86,6 @@ vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod) { vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = pow(ret.rgb, vec3(2.2)); - vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); float det = min(lod/(proj_lod*0.5), 1.0); @@ -107,8 +103,6 @@ vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod) { vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = pow(ret.rgb, vec3(2.2)); - vec2 dist = tc-vec2(0.5); float d = dot(dist,dist); diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl index dd7de9f123..765b0927c3 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl @@ -27,7 +27,7 @@ VARYING vec3 vary_SunlitColor; VARYING vec3 vary_AdditiveColor; VARYING vec3 vary_AtmosAttenuation; -uniform float global_gamma; + vec3 getSunlitColor() { return vec3(0,0,0); @@ -38,7 +38,7 @@ vec3 getAmblitColor() } vec3 getAdditiveColor() { - return pow(vary_AdditiveColor, vec3(global_gamma)) * global_gamma; + return vary_AdditiveColor; } vec3 getAtmosAttenuation() { diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl index 61f3088648..99dbee15ee 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl @@ -33,20 +33,18 @@ vec3 sunlit_color; vec3 amblit_color; vec3 position_eye; -uniform float global_gamma; - vec3 getSunlitColor() { - return pow(sunlit_color, vec3(global_gamma)) * global_gamma; + return sunlit_color; } vec3 getAmblitColor() { - return pow(amblit_color, vec3(global_gamma)) * global_gamma; + return amblit_color; } vec3 getAdditiveColor() { - return pow(additive_color, vec3(global_gamma)) * global_gamma; + return additive_color; } vec3 getAtmosAttenuation() { |