summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/lighting
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-23 09:58:33 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-23 09:58:33 -0700
commitd0a0eede63fdbd4ba597b86cbfbeb5b394ed2395 (patch)
treeb84761e659eb528695b781cd973192c4b43634f1 /indra/newview/app_settings/shaders/class2/lighting
parent360b3230bbfbda7988eee84a8ed04fa1696ca70a (diff)
Add render debug controls for forcing disable of ambient, sun, and local light contributions
(engages AMBIENT_KILL, SUNLIGHT_KILL, and LOCAL_LIGHT_KILL defines in shaders to accomplish those tasks as required by each render mode).
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/lighting')
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
index 57f93a8b36..8795d69a3a 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
@@ -44,9 +44,16 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color)
col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z);
col.rgb = scaleDownLight(col.rgb);
+#if defined(LOCAL_LIGHT_KILL)
+ col.rgb = vec3(0);
+i#endif
+
// Add windlight lights
col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz));
+#if !defined(SUNLIGHT_KILL)
col.rgb = min(col.rgb*color.rgb, 1.0);
+#endif
+
return col;
}