diff options
| author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-22 19:04:52 +0200 | 
|---|---|---|
| committer | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-22 19:04:52 +0200 | 
| commit | 1b67dd855c41f5a0cda7ec2a68d98071986ca703 (patch) | |
| tree | ab243607f74f78200787bba5b9b88f07ef1b966f /indra/newview/app_settings/shaders/class1/lighting | |
| parent | 6d6eabca44d08d5b97bfe3e941d2b9687c2246ea (diff) | |
| parent | e1623bb276f83a43ce7a197e388720c05bdefe61 (diff) | |
Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts:
#	autobuild.xml
#	indra/cmake/CMakeLists.txt
#	indra/cmake/GoogleMock.cmake
#	indra/llaudio/llaudioengine_fmodstudio.cpp
#	indra/llaudio/llaudioengine_fmodstudio.h
#	indra/llaudio/lllistener_fmodstudio.cpp
#	indra/llaudio/lllistener_fmodstudio.h
#	indra/llaudio/llstreamingaudio_fmodstudio.cpp
#	indra/llaudio/llstreamingaudio_fmodstudio.h
#	indra/llcharacter/llmultigesture.cpp
#	indra/llcharacter/llmultigesture.h
#	indra/llimage/llimage.cpp
#	indra/llimage/llimagepng.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llimage/tests/llimageworker_test.cpp
#	indra/llmessage/tests/llmockhttpclient.h
#	indra/llprimitive/llgltfmaterial.h
#	indra/llrender/llfontfreetype.cpp
#	indra/llui/llcombobox.cpp
#	indra/llui/llfolderview.cpp
#	indra/llui/llfolderviewmodel.h
#	indra/llui/lllineeditor.cpp
#	indra/llui/lllineeditor.h
#	indra/llui/lltextbase.cpp
#	indra/llui/lltextbase.h
#	indra/llui/lltexteditor.cpp
#	indra/llui/lltextvalidate.cpp
#	indra/llui/lltextvalidate.h
#	indra/llui/lluictrl.h
#	indra/llui/llview.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappearancemgr.cpp
#	indra/newview/llappearancemgr.h
#	indra/newview/llavatarpropertiesprocessor.cpp
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llbreadcrumbview.cpp
#	indra/newview/llbreadcrumbview.h
#	indra/newview/llbreastmotion.cpp
#	indra/newview/llbreastmotion.h
#	indra/newview/llconversationmodel.h
#	indra/newview/lldensityctrl.cpp
#	indra/newview/lldensityctrl.h
#	indra/newview/llface.inl
#	indra/newview/llfloatereditsky.cpp
#	indra/newview/llfloatereditwater.cpp
#	indra/newview/llfloateremojipicker.h
#	indra/newview/llfloaterimsessiontab.cpp
#	indra/newview/llfloaterprofiletexture.cpp
#	indra/newview/llfloaterprofiletexture.h
#	indra/newview/llgesturemgr.cpp
#	indra/newview/llgesturemgr.h
#	indra/newview/llimpanel.cpp
#	indra/newview/llimpanel.h
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventorybridge.h
#	indra/newview/llinventoryclipboard.cpp
#	indra/newview/llinventoryclipboard.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventoryfunctions.h
#	indra/newview/llinventorygallery.cpp
#	indra/newview/lllistbrowser.cpp
#	indra/newview/lllistbrowser.h
#	indra/newview/llpanelobjectinventory.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpanelprofile.h
#	indra/newview/llpreviewgesture.cpp
#	indra/newview/llsavedsettingsglue.cpp
#	indra/newview/llsavedsettingsglue.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llurllineeditorctrl.cpp
#	indra/newview/llvectorperfoptions.cpp
#	indra/newview/llvectorperfoptions.h
#	indra/newview/llviewerparceloverlay.cpp
#	indra/newview/llviewertexlayer.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/macmain.h
#	indra/test/test.cpp
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/lighting')
9 files changed, 150 insertions, 150 deletions
| diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl index 6535c0835e..c7cb076099 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl @@ -1,28 +1,28 @@ -/**  +/**   * @file class1\lighting\lightAlphaMaskF.glsl   *   * $LicenseInfo:firstyear=2011&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2011, Linden Research, Inc. - *  + *   * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - *  + *   * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - *  + *   * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - *  + *   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  +  out vec4 frag_color;  uniform float minimum_alpha; @@ -33,20 +33,20 @@ vec3 scaleSoftClip(vec3 light);  in vec4 vertex_color;  in vec2 vary_texcoord0; -void default_lighting()  +void default_lighting()  { -	vec4 color = diffuseLookup(vary_texcoord0.xy); -	 -	if (color.a < minimum_alpha) -	{ -		discard; -	} -	 -	color *= vertex_color; - -	color.rgb = atmosLighting(color.rgb); -	color.rgb = scaleSoftClip(color.rgb); - -	frag_color = max(color, vec4(0)); +    vec4 color = diffuseLookup(vary_texcoord0.xy); + +    if (color.a < minimum_alpha) +    { +        discard; +    } + +    color *= vertex_color; + +    color.rgb = atmosLighting(color.rgb); +    color.rgb = scaleSoftClip(color.rgb); + +    frag_color = max(color, vec4(0));  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl index 4dc67028d5..77324edcff 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl @@ -1,24 +1,24 @@ -/**  +/**   * @file class1\lighting\lightAlphaMaskNonIndexedF.glsl   *   * $LicenseInfo:firstyear=2011&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2011, Linden Research, Inc. - *  + *   * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - *  + *   * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - *  + *   * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - *  + *   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ @@ -35,21 +35,21 @@ vec3 scaleSoftClip(vec3 light);  in vec4 vertex_color;  in vec2 vary_texcoord0; -void default_lighting()  +void default_lighting()  { -	vec4 color = texture(diffuseMap,vary_texcoord0.xy); +    vec4 color = texture(diffuseMap,vary_texcoord0.xy); -	if (color.a < minimum_alpha) -	{ -		discard; -	} +    if (color.a < minimum_alpha) +    { +        discard; +    } -	color *= vertex_color; +    color *= vertex_color; -	color.rgb = atmosLighting(color.rgb); +    color.rgb = atmosLighting(color.rgb); -	color.rgb = scaleSoftClip(color.rgb); +    color.rgb = scaleSoftClip(color.rgb); -	frag_color = max(color, vec4(0)); +    frag_color = max(color, vec4(0));  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl index 2d1c7dadb0..e8523935ed 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl @@ -1,24 +1,24 @@ -/**  +/**   * @file class1\lighting\lightF.glsl   *   * $LicenseInfo:firstyear=2007&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2007, Linden Research, Inc. - *  + *   * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - *  + *   * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - *  + *   * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - *  + *   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ @@ -31,14 +31,14 @@ in vec2 vary_texcoord0;  vec3 atmosLighting(vec3 light);  vec3 scaleSoftClip(vec3 light); -void default_lighting()  +void default_lighting()  { -	vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color; -	 -	color.rgb = atmosLighting(color.rgb); +    vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color; + +    color.rgb = atmosLighting(color.rgb); -	color.rgb = scaleSoftClip(color.rgb); +    color.rgb = scaleSoftClip(color.rgb); -	frag_color = max(color, vec4(0)); +    frag_color = max(color, vec4(0));  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl index 13a6dde4aa..6ca6c88289 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl @@ -1,58 +1,58 @@ -/**  +/**   * @file class1/lighting\lightFuncSpecularV.glsl   *   * $LicenseInfo:firstyear=2007&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2007, Linden Research, Inc. - *  + *   * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - *  + *   * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - *  + *   * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - *  + *   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  +  float calcDirectionalSpecular(vec3 view, vec3 n, vec3 l)  { -	return pow(max(dot(reflect(view, n),l), 0.0),8.0); +    return pow(max(dot(reflect(view, n),l), 0.0),8.0);  }  float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da)  { -	 -	specular.rgb += calcDirectionalSpecular(view,n,l)*lightCol*da; -	return max(dot(n,l),0.0); + +    specular.rgb += calcDirectionalSpecular(view,n,l)*lightCol*da; +    return max(dot(n,l),0.0);  }  vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 l, float r, float pw, vec3 lightCol)  { -	//get light vector -	vec3 lv = l-v; -	 -	//get distance -	float d = length(lv); -	 -	//normalize light vector -	lv *= 1.0/d; -	 -	//distance attenuation -	float da = clamp(1.0/(r * d), 0.0, 1.0); -	 -	//angular attenuation -	 -	da *= calcDirectionalLightSpecular(specular, view, n, lv, lightCol, da); -	 -	return da*lightCol;	 +    //get light vector +    vec3 lv = l-v; + +    //get distance +    float d = length(lv); + +    //normalize light vector +    lv *= 1.0/d; + +    //distance attenuation +    float da = clamp(1.0/(r * d), 0.0, 1.0); + +    //angular attenuation + +    da *= calcDirectionalLightSpecular(specular, view, n, lv, lightCol, da); + +    return da*lightCol;  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl index 45701002b8..6ddf7b9417 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl @@ -1,58 +1,58 @@ -/**  +/**   * @file class1\lighting\lightFuncV.glsl   *   * $LicenseInfo:firstyear=2007&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2007, Linden Research, Inc. - *  + *   * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - *  + *   * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - *  + *   * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - *  + *   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  +  float calcDirectionalLight(vec3 n, vec3 l)  { -	float a = max(dot(n,l),0.0); -	return a; +    float a = max(dot(n,l),0.0); +    return a;  }  float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)  { -	//get light vector -	vec3 lv = lp.xyz-v; -	 -	//get distance -	float d = length(lv); -	 -	//normalize light vector -	lv *= 1.0/d; -	 -	//distance attenuation -	float da = clamp(1.0/(la * d), 0.0, 1.0); -	 -	// spotlight coefficient. -	float spot = max(dot(-ln, lv), is_pointlight); -	da *= spot*spot; // GL_SPOT_EXPONENT=2 - -	//angular attenuation -	da *= calcDirectionalLight(n, lv); - -	return da; +    //get light vector +    vec3 lv = lp.xyz-v; + +    //get distance +    float d = length(lv); + +    //normalize light vector +    lv *= 1.0/d; + +    //distance attenuation +    float da = clamp(1.0/(la * d), 0.0, 1.0); + +    // spotlight coefficient. +    float spot = max(dot(-ln, lv), is_pointlight); +    da *= spot*spot; // GL_SPOT_EXPONENT=2 + +    //angular attenuation +    da *= calcDirectionalLight(n, lv); + +    return da;  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightNonIndexedF.glsl index cea08ecffd..95200444b9 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightNonIndexedF.glsl @@ -1,30 +1,30 @@ -/**  +/**   * @file class1\lighting\lightF.glsl   *   * $LicenseInfo:firstyear=2007&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2007, Linden Research, Inc. - *  + *   * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - *  + *   * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - *  + *   * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - *  + *   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */  out vec4 frag_color; -  +  in vec4 vertex_color;  in vec2 vary_texcoord0; @@ -33,14 +33,14 @@ uniform sampler2D diffuseMap;  vec3 atmosLighting(vec3 light);  vec3 scaleSoftClip(vec3 light); -void default_lighting()  +void default_lighting()  { -	vec4 color = texture(diffuseMap,vary_texcoord0.xy) * vertex_color; -	 -	color.rgb = atmosLighting(color.rgb); +    vec4 color = texture(diffuseMap,vary_texcoord0.xy) * vertex_color; + +    color.rgb = atmosLighting(color.rgb); -	color.rgb = scaleSoftClip(color.rgb); +    color.rgb = scaleSoftClip(color.rgb); -	frag_color = max(color, vec4(0)); +    frag_color = max(color, vec4(0));  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl index 06aed40e26..c510932930 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl @@ -1,28 +1,28 @@ -/**  +/**   * @file class1\lighting\lightSpecularV.glsl   *   * $LicenseInfo:firstyear=2007&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2007, Linden Research, Inc. - *  + *   * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - *  + *   * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - *  + *   * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - *  + *   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  +  // All lights, no specular highlights @@ -31,6 +31,6 @@ vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor  vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor)  { -	return sumLightsSpecular(pos, norm, color, specularColor); +    return sumLightsSpecular(pos, norm, color, specularColor);  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl index 7c3697c333..ceb2bce4f1 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl @@ -4,25 +4,25 @@   * $LicenseInfo:firstyear=2005&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2005, Linden Research, Inc. - *  + *   * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - *  + *   * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - *  + *   * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - *  + *   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -   +  float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da); @@ -36,22 +36,22 @@ uniform vec3 light_diffuse[8];  vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor)  { -	vec4 col = vec4(0,0,0, color.a); -		 -	vec3 view = normalize(pos); -	 -	/// collect all the specular values from each calcXXXLightSpecular() function -	vec4 specularSum = vec4(0.0); +    vec4 col = vec4(0,0,0, color.a); + +    vec3 view = normalize(pos); + +    /// collect all the specular values from each calcXXXLightSpecular() function +    vec4 specularSum = vec4(0.0); -	col.rgb += light_diffuse[1].rgb * calcDirectionalLightSpecular(specularColor, view, norm, light_position[1].xyz,light_diffuse[1].rgb, 1.0); -	col.rgb = scaleDownLight(col.rgb); -	col.rgb += atmosAmbient(); -	col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, light_position[0].xyz, atmosGetDiffuseSunlightColor(), 1.0)); +    col.rgb += light_diffuse[1].rgb * calcDirectionalLightSpecular(specularColor, view, norm, light_position[1].xyz,light_diffuse[1].rgb, 1.0); +    col.rgb = scaleDownLight(col.rgb); +    col.rgb += atmosAmbient(); +    col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, light_position[0].xyz, atmosGetDiffuseSunlightColor(), 1.0)); -	col.rgb = min(col.rgb * color.rgb, 1.0); -	specularColor.rgb = min(specularColor.rgb * specularSum.rgb, 1.0); +    col.rgb = min(col.rgb * color.rgb, 1.0); +    specularColor.rgb = min(specularColor.rgb * specularSum.rgb, 1.0); -	col.rgb += specularColor.rgb; +    col.rgb += specularColor.rgb; -	return col;	 +    return col;  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl index 75a327d3d7..a2521384b5 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl @@ -4,25 +4,25 @@   * $LicenseInfo:firstyear=2005&license=viewerlgpl$   * Second Life Viewer Source Code   * Copyright (C) 2005, Linden Research, Inc. - *  + *   * This library is free software; you can redistribute it and/or   * modify it under the terms of the GNU Lesser General Public   * License as published by the Free Software Foundation;   * version 2.1 of the License only. - *  + *   * This library is distributed in the hope that it will be useful,   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   * Lesser General Public License for more details. - *  + *   * You should have received a copy of the GNU Lesser General Public   * License along with this library; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - *  + *   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  +  uniform vec4 light_position[8];  uniform vec3 light_diffuse[8]; @@ -34,14 +34,14 @@ vec3 scaleDownLight(vec3 light);  vec4 sumLights(vec3 pos, vec3 norm, vec4 color)  { -	vec4 col = vec4(0); -	col.a = color.a; -	 -	col.rgb = light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz); +    vec4 col = vec4(0); +    col.a = color.a; + +    col.rgb = light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz);      col.rgb += light_diffuse[1].rgb * sqrt(calcDirectionalLight(norm, -light_position[1].xyz)*0.5+0.25); -	col.rgb = min(col.rgb*color.rgb, 1.0); -	return col;	 +    col.rgb = min(col.rgb*color.rgb, 1.0); +    return col;  } | 
