diff options
author | Graham Linden <graham@lindenlab.com> | 2018-06-01 00:18:36 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-06-01 00:18:36 +0100 |
commit | 64302d3000b69b31e72eb6a3bd8a981c80cb88de (patch) | |
tree | d942aa56bc50bd44542ff5f7757d46a6189e8036 /indra/newview/app_settings | |
parent | 439273c9c11ec5f3c186fd7d97a28d11419153cd (diff) |
Modify use of sky settings, reduce complexity, and name funcs to indicate coord systems in use.
Fix class2 softenLightF shader.
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c9e0f7c2f4..0793784878 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8645,7 +8645,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>RenderLocalLights</key> <map> diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index c20092bfe0..371b32406c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -82,6 +82,8 @@ vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten); vec3 scaleFragSoftClip(vec3 l); vec3 atmosFragAffectDirectionalLight(float intensity, vec3 sunlit); void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten); +vec3 fullbrightFragAtmosTransport(vec3 l, vec3 additive, vec3 atten); +vec3 fullbrightScaleSoftClipFrag(vec3 l, vec3 atten); vec4 getPosition_d(vec2 pos_screen, float depth) { @@ -147,7 +149,7 @@ void main() calcFragAtmospherics(pos.xyz, ambocc, sunlit, amblit, additive, atten); - col = atmosAmbient(vec3(0)); + col = atmosFragAmbient(vec3(0), amblit); float ambient = min(abs(dot(norm.xyz, sun_dir.xyz)), 1.0); ambient *= 0.5; ambient *= ambient; @@ -167,7 +169,7 @@ void main() // float sa = dot(refnormpersp, sun_dir.xyz); - vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*(texture2D(lightFunc, vec2(sa, spec.a)).r); + vec3 dumbshiny = sunlit*scol_ambocc.r*(texture2D(lightFunc, vec2(sa, spec.a)).r); // add the two types of shiny together vec3 spec_contrib = dumbshiny * spec.rgb; @@ -192,7 +194,7 @@ void main() if (norm.w < 0.5) { col = mix(atmosFragLighting(col, additive, atten), fullbrightFragAtmosTransport(col, atten, additive), diffuse.a); - col = mix(scaleFragSoftClip(col), fullbrightFragScaleSoftClip(col), diffuse.a); + col = mix(scaleFragSoftClip(col), fullbrightScaleSoftClipFrag(col, atten), diffuse.a); } #ifdef WATER_FOG |