summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-03-07 15:09:34 -0800
committerGraham Linden <graham@lindenlab.com>2019-03-07 15:09:34 -0800
commit53f3755a4629206754a5695de233d88062a54d3d (patch)
tree2d82c2a20ae4a6e19686748b79db7610759ffb3e /indra/newview/app_settings/shaders/class1
parentdc4b34966ae6830a06bf266da6f600b32da8cfbd (diff)
Fix tabs.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl9
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl2
2 files changed, 4 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index dd691fb36b..5f4f1677d7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -301,7 +301,8 @@ void main()
ambient *= ambient;
ambient = 1.0 - ambient * smoothstep(0.0, 0.3, shadow);
- vec3 sun_contrib = min(da, shadow) * sunlit;
+ float final_da = min(da, shadow);
+ vec3 sun_contrib = final_da * sunlit;
col.rgb *= ambient;
col.rgb += sun_contrib;
@@ -314,7 +315,7 @@ void main()
// the old infinite-sky shiny reflection
//
- float sa = dot(refnormpersp, sun_dir.xyz);
+ float sa = dot(refnormpersp, light_dir.xyz);
vec3 dumbshiny = sunlit*shadow*(texture2D(lightFunc, vec2(sa, spec.a)).r);
@@ -351,8 +352,6 @@ vec3 post_spec = col.rgb;
col = atmosFragLighting(col, additive, atten);
col = scaleSoftClipFrag(col);
-vec3 post_atmo= col.rgb;
-
vec3 npos = normalize(-pos.xyz);
vec3 light = vec3(0,0,0);
@@ -369,8 +368,6 @@ vec3 post_atmo= col.rgb;
col.rgb += light.rgb;
-vec3 post_lighting = col.rgb;
-
glare = min(glare, 1.0);
float al = max(diffcol.a,glare)*vertex_color.a;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 07a24698a9..a39a73f1b6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -125,7 +125,7 @@ void main()
if (spec.a > 0.0) // specular reflection
{
// the old infinite-sky shiny reflection
- float sa = dot(refnormpersp, sun_dir.xyz);
+ float sa = dot(refnormpersp, light_dir.xyz);
vec3 dumbshiny = sunlit*(texture2D(lightFunc, vec2(sa, spec.a)).r);
// add the two types of shiny together