From 534d326c48271b63c4cc173f1d2382846b028021 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 4 Jun 2020 11:47:55 -0700 Subject: SL-13084: Fix clouds flipped along East/West axis to match texture preview Cloud Image and direction to match Cloud Scroll --- indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl') diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index 2c1475d547..fdd90eb004 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -72,7 +72,12 @@ void main() // World / view / projection gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); - vary_texcoord0 = texcoord0; + // SL-13084 EEP added support for custom cloud textures -- flip them horizontally to match the preview of Clouds > Cloud Scroll + // Keep in Sync! + // * indra\newview\llsettingsvo.cpp + // * indra\newview\app_settings\shaders\class2\windlight\cloudsV.glsl + // * indra\newview\app_settings\shaders\class1\deferred\cloudsV.glsl + vary_texcoord0 = vec2( -texcoord0.x, texcoord0.y ); // Get relative position vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0); -- cgit v1.2.3 From b6941de16a24d65d73370f51c07815ef56c81c4c Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Fri, 5 Jun 2020 08:44:44 -0700 Subject: SL-13084: Fix inverted cloud scroll with ALM is off --- indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl') diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index fdd90eb004..b55555ad23 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -181,7 +181,6 @@ void main() // Texture coords - vary_texcoord0 = texcoord0; vary_texcoord0.xy -= 0.5; vary_texcoord0.xy /= cloud_scale; vary_texcoord0.xy += 0.5; -- cgit v1.2.3 From 4a92f1787090009b8f11c85b6c267b099eda7dd8 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Fri, 5 Jun 2020 08:50:59 -0700 Subject: SL-13084: Move texture coords section to top in class2/windlight/cloudsV to match class1/deffered/cloudsV --- .../shaders/class2/windlight/cloudsV.glsl | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl') diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index b55555ad23..7d560b0363 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -72,6 +72,7 @@ void main() // World / view / projection gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + // Texture coords // SL-13084 EEP added support for custom cloud textures -- flip them horizontally to match the preview of Clouds > Cloud Scroll // Keep in Sync! // * indra\newview\llsettingsvo.cpp @@ -79,6 +80,17 @@ void main() // * indra\newview\app_settings\shaders\class1\deferred\cloudsV.glsl vary_texcoord0 = vec2( -texcoord0.x, texcoord0.y ); + vary_texcoord0.xy -= 0.5; + vary_texcoord0.xy /= cloud_scale; + vary_texcoord0.xy += 0.5; + + vary_texcoord1 = vary_texcoord0; + vary_texcoord1.x += lightnorm.x * 0.0125; + vary_texcoord1.y += lightnorm.z * 0.0125; + + vary_texcoord2 = vary_texcoord0 * 16.; + vary_texcoord3 = vary_texcoord1 * 16.; + // Get relative position vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0); @@ -180,18 +192,6 @@ void main() vary_CloudDensity = 2. * (cloud_shadow - 0.25); - // Texture coords - vary_texcoord0.xy -= 0.5; - vary_texcoord0.xy /= cloud_scale; - vary_texcoord0.xy += 0.5; - - vary_texcoord1 = vary_texcoord0; - vary_texcoord1.x += lightnorm.x * 0.0125; - vary_texcoord1.y += lightnorm.z * 0.0125; - - vary_texcoord2 = vary_texcoord0 * 16.; - vary_texcoord3 = vary_texcoord1 * 16.; - // Combine these to minimize register use vary_CloudColorAmbient += oHazeColorBelowCloud; -- cgit v1.2.3 From 8925e821e86b6067e86f5aa65fc232fb9920c1b7 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Fri, 5 Jun 2020 09:27:13 -0700 Subject: SL-13084: Add references to other common files --- .../app_settings/shaders/class2/windlight/cloudsV.glsl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl') diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index 7d560b0363..a4389f62dc 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -36,6 +36,7 @@ ATTRIBUTE vec2 texcoord0; VARYING vec4 vary_CloudColorSun; VARYING vec4 vary_CloudColorAmbient; VARYING float vary_CloudDensity; + VARYING vec2 vary_texcoord0; VARYING vec2 vary_texcoord1; VARYING vec2 vary_texcoord2; @@ -66,19 +67,20 @@ uniform vec4 cloud_color; uniform float cloud_scale; +// NOTE: Keep these in sync! +// indra\newview\app_settings\shaders\class1\deferred\skyV.glsl +// indra\newview\app_settings\shaders\class1\deferred\cloudsV.glsl +// indra\newview\app-settings\shaders\class2\windlight\cloudsV.glsl +// indra\newview\lllegacyatmospherics.cpp +// indra\newview\llsettingsvo.cpp void main() { - // World / view / projection gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); // Texture coords // SL-13084 EEP added support for custom cloud textures -- flip them horizontally to match the preview of Clouds > Cloud Scroll - // Keep in Sync! - // * indra\newview\llsettingsvo.cpp - // * indra\newview\app_settings\shaders\class2\windlight\cloudsV.glsl - // * indra\newview\app_settings\shaders\class1\deferred\cloudsV.glsl - vary_texcoord0 = vec2( -texcoord0.x, texcoord0.y ); + vary_texcoord0 = vec2( -texcoord0.x, texcoord0.y ); // See: LLSettingsVOSky::applySpecial vary_texcoord0.xy -= 0.5; vary_texcoord0.xy /= cloud_scale; -- cgit v1.2.3 From 1e26adf288f8b4585c0ce8338dd548475613862c Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Fri, 22 Jan 2021 16:31:50 -0800 Subject: SL-14707: Merge Sovereign Engineer's fix for clouds: Clouds are unusually dim in EEP --- indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl') diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index b004cc7ddd..97ffa9feef 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -166,6 +166,7 @@ void main() (blue_horizon * blue_weight * (sunlight + tmpAmbient) + (haze_horizon * haze_weight) * (sunlight * haze_glow + tmpAmbient)); // CLOUDS + sunlight = sunlight_color; // SL-14707 reset color -- Clouds are unusually dim in EEP off_axis = 1.0 / max(1e-6, lightnorm.y * 2.); sunlight *= exp(-light_atten * off_axis); -- cgit v1.2.3