summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-03-19 15:02:13 -0700
committerGraham Linden <graham@lindenlab.com>2019-03-19 15:02:13 -0700
commit1a6f54cb5ede03f7e7d0b24f7eb45081adf0464e (patch)
treeef652dfca9c93b1cd2411afdecebadccf4f85d75 /indra/newview/app_settings/shaders/class1/deferred
parent30bdc6c7c5ea068d72c13f18ea550d86889892d4 (diff)
SL-10764
Fix lighting issues when using shaders, but not ALM. Shader code cleanup (remove do nothing functions only in one file). Fix obsolete comment to refer to correct storage for projector ambiance.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl5
2 files changed, 5 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
index 08ddaeceb3..d5ef010017 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
@@ -45,17 +45,6 @@ VARYING vec2 vary_texcoord0;
vec4 applyWaterFogView(vec3 pos, vec4 color);
#endif
-vec3 fullbrightAtmosTransportDeferred(vec3 light)
-{
- return light;
-}
-
-vec3 fullbrightScaleSoftClipDeferred(vec3 light)
-{
- //soft clip effect:
- return light;
-}
-
#ifdef HAS_ALPHA_MASK
uniform float minimum_alpha;
#endif
@@ -78,8 +67,6 @@ void main()
#endif
color.rgb *= vertex_color.rgb;
- color.rgb = fullbrightAtmosTransportDeferred(color.rgb);
- color.rgb = fullbrightScaleSoftClipDeferred(color.rgb);
#ifdef WATER_FOG
vec3 pos = vary_position;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index 2569e49743..57916eb3e5 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -72,10 +72,13 @@ uniform vec2 screen_res;
uniform mat4 inv_proj;
vec3 getNorm(vec2 pos_screen);
+vec3 srgb_to_linear(vec3 cs);
+vec3 linear_to_srgb(vec3 cl);
vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
+ ret.rgb = srgb_to_linear(ret.rgb);
vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
@@ -95,6 +98,7 @@ vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
+ ret.rgb = srgb_to_linear(ret.rgb);
vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
@@ -112,6 +116,7 @@ vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
+ ret.rgb = srgb_to_linear(ret.rgb);
vec2 dist = tc-vec2(0.5);