diff options
author | Dave Parks <davep@lindenlab.com> | 2022-05-16 12:26:17 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-05-16 12:26:17 -0500 |
commit | b2141e94465998d13ab4b5d894b0edcdad0e8216 (patch) | |
tree | cba0541baffa141e9e3e2aecd16ce8cd9457c88c /indra/newview/app_settings | |
parent | 3400e5fd302c0d9dea6386c4d5bf38876f2cc287 (diff) | |
parent | 63095005578007345d9916ebc6855246cdb08c7c (diff) |
Merge remote-tracking branch 'remotes/origin/DRTVWR-546' into DRTVWR-559
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 6 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/objects/previewV.glsl | 29 |
2 files changed, 6 insertions, 29 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 284b779be3..9f39ea9c8c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8110,9 +8110,9 @@ <string>Color4</string> <key>Value</key> <array> - <real>1.0</real> - <real>1.0</real> - <real>1.0</real> + <real>0.33</real> + <real>0.33</real> + <real>0.33</real> <real>1.0</real> </array> </map> diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl index 4bb588335a..5886f47cbc 100644 --- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl @@ -51,30 +51,6 @@ float calcDirectionalLight(vec3 n, vec3 l) return a; } - -float calcLocalLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, 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; -} //==================================================================================================== @@ -91,7 +67,8 @@ void main() // Collect normal lights (need to be divided by two, as we later multiply by 2) col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz); - col.rgb += light_diffuse[2].rgb*calcLocalLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z); - col.rgb += light_diffuse[3].rgb*calcLocalLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z); + col.rgb += light_diffuse[2].rgb * calcDirectionalLight(norm, light_position[2].xyz); + col.rgb += light_diffuse[3].rgb * calcDirectionalLight(norm, light_position[3].xyz); + vertex_color = col*color; } |