From d0a0eede63fdbd4ba597b86cbfbeb5b394ed2395 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 23 May 2019 09:58:33 -0700 Subject: 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). --- indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/app_settings/shaders/class2/lighting') 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; } -- cgit v1.2.3