diff options
| author | Graham Linden <graham@lindenlab.com> | 2019-03-20 13:07:21 -0700 | 
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2019-03-20 13:07:21 -0700 | 
| commit | edf8ba6e5ff0fc2b5ef55219c82af7b0f20437d9 (patch) | |
| tree | b84b4b41e4232ab6839a6ea1db6ac694583ef88c | |
| parent | cdad939bbd6fbed4cfc863469d5c37e17bbcf698 (diff) | |
SL-10449
Fix name of attenuation setter used.
Fix flipped light vec.
Make class3 lights use shadows on projector ambiance too.
5 files changed, 7 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl index f1ada39854..8891315e15 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl @@ -29,7 +29,7 @@ ATTRIBUTE vec3 position;  uniform vec2 screen_res; -void setAttenuation(vec3 c); +void setAtmosAttenuation(vec3 c);  void setAdditiveColor(vec3 c);  VARYING vec2 vary_fragcoord; @@ -39,7 +39,7 @@ void main()      vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);      gl_Position = pos;       // appease OSX GLSL compiler/linker by touching all the varyings we said we would -    setAttenuation(vec3(1)); +    setAtmosAttenuation(vec3(1));      setAdditiveColor(vec3(0));      vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl index dd14192ad6..a9288b3df6 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl @@ -52,7 +52,7 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa  	da *= spot*spot; // GL_SPOT_EXPONENT=2  	//angular attenuation -	da *= calcDirectionalLight(n, -lv); +	da *= calcDirectionalLight(n, lv);  	return da;	  } diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl index 72bccc5627..0c113282b5 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl @@ -228,7 +228,7 @@ void main()  		//float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0);  		vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod); -		amb_da += (da*da*0.5+0.5)*proj_ambiance; +		amb_da += (da*da*0.5+0.5)*(1.0-shadow)*proj_ambiance;  		amb_da *= dist_atten * noise; diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl index 3b2b0d5718..00b276f585 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl @@ -227,7 +227,7 @@ void main()  		//float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0);  		vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod); -		amb_da += (da*da*0.5+0.5)*proj_ambiance; +		amb_da += (da*da*0.5+0.5)*(1.0-shadow)*proj_ambiance;  		amb_da *= dist_atten * noise; @@ -261,9 +261,6 @@ void main()  		}  	}	 -	 -	 -	  	if (envIntensity > 0.0)  	{ diff --git a/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl index 5302b05043..7cd0d505f9 100644 --- a/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl +++ b/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl @@ -48,10 +48,10 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)  	col.rgb += light_diffuse[5].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[5], light_direction[5], light_attenuation[5].x, light_attenuation[5].z);  	col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].z);  	col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].z); -	col.rgb += light_diffuse[1].rgb*calcDirectionalLight(norm, light_position[1].xyz); +	col.rgb += light_diffuse[1].rgb*calcDirectionalLight(norm, light_direction[1].xyz);  	// Add windlight lights -	col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz)); +	col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_direction[0].xyz));  	col.rgb += atmosAmbient(baseLight.rgb);  	col.rgb = min(col.rgb*color.rgb, 1.0);  | 
