diff options
author | Graham Linden <graham@lindenlab.com> | 2019-01-25 16:29:05 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-01-25 16:29:05 -0800 |
commit | 431a26c118ec0dea154a2fb2c93ae96ae41b3d7b (patch) | |
tree | 02a4e1bc0f67dc7a8bfac308e552dc98edf213f3 /indra | |
parent | 64ce16aa078a028a2009d0d76bc2bf2133f033c5 (diff) |
SL-10303, SL-10414
Fix positioning of sun/moon discs w.r.t atmo haze glow.
Disable killing glow when sun is not up.
Diffstat (limited to 'indra')
8 files changed, 19 insertions, 16 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl index fe336fc3a8..baf54c1fbe 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl @@ -132,7 +132,7 @@ void main() temp2.x = pow(temp2.x, glow.z); // glow.z should be negative, so we're doing a sort of (1 / "angle") function - temp2.x *= sun_up_factor; + //temp2.x *= sun_up_factor; // Add "minimum anti-solar illumination" temp2.x += .25; diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl index 0a68fc82f7..e1bac4f248 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl @@ -37,10 +37,11 @@ void calcAtmospherics(vec3 eye_pos); void main() { //transform vertex - vec4 vert = vec4(position.xyz, 1.0); + vec3 offset = vec3(0, 0, 50); + vec4 vert = vec4(position.xyz - offset, 1.0); vec4 pos = (modelview_matrix * vert); - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); + gl_Position = modelview_projection_matrix*vert; calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl b/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl index aaa6768ed7..1c43a7332e 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl @@ -36,13 +36,14 @@ VARYING vec2 vary_texcoord0; void main() { - //transform vertex - vec4 vert = vec4(position.xyz, 1.0); - vec4 pos = (modelview_matrix * vert); + //transform vertex + vec3 offset = vec3(0, 0, 50); + vec4 vert = vec4(position.xyz - offset, 1.0); + vec4 pos = (modelview_matrix * vert); - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); - - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - - calcAtmospherics(pos.xyz); + gl_Position = modelview_projection_matrix*vert; + + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; + + calcAtmospherics(pos.xyz); } diff --git a/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl b/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl index 1fa32c3f3b..ca116628f1 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl @@ -38,7 +38,8 @@ void calcAtmospherics(vec3 eye_pos); void main() { //transform vertex - vec4 vert = vec4(position.xyz, 1.0); + vec3 offset = vec3(0, 0, 50); + vec4 vert = vec4(position.xyz - offset, 1.0); vec4 pos = modelview_projection_matrix*vert; sun_fade = smoothstep(0.3, 1.0, (position.z + 50) / 512.0f); diff --git a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl index 6ddd7e7c86..792aa4e85c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl @@ -153,7 +153,7 @@ void main() // Add "minimum anti-solar illumination" temp2.x += .25; - temp2.x *= sun_up_factor; + //temp2.x *= sun_up_factor; // Haze color above cloud vec4 color = ( blue_horizon * blue_weight * (sunlight + ambient) diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl index 5cf3cd1dd2..8d1e5e3281 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl @@ -119,7 +119,7 @@ void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, //add "minimum anti-solar illumination" temp2.x += .25; - temp2.x *= sun_up_factor; + //temp2.x *= sun_up_factor; //increase ambient when there are more clouds vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5; diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index 644cd5a35b..a250cf2c45 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -131,7 +131,7 @@ void main() temp2.x = pow(temp2.x, glow.z); // glow.z should be negative, so we're doing a sort of (1 / "angle") function - temp2.x *= sun_up_factor; + //temp2.x *= sun_up_factor; // Add "minimum anti-solar illumination" temp2.x += .25; diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl index 04cf4052b8..f509f9f8d4 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl @@ -119,7 +119,7 @@ void main() temp2.x = pow(temp2.x, glow.z); // glow.z should be negative, so we're doing a sort of (1 / "angle") function - temp2.x *= sun_up_factor; + //temp2.x *= sun_up_factor; // Add "minimum anti-solar illumination" temp2.x += .25; |