diff options
author | Graham Linden <graham@lindenlab.com> | 2018-06-12 18:42:07 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-06-12 18:42:07 +0100 |
commit | 67ab0084f87c40bf31d7fadded55cc9ea6299ca2 (patch) | |
tree | 1d8119cd8d0b6078724a8128da37c15321a9f703 /indra/newview/app_settings/shaders/class3 | |
parent | 327ded51298599a0057c4a3baf388956ecfed2e5 (diff) |
Fix env panel forward action.
Make env panel update environment when jumping frame to frame.
Add separate funcs for sun/moon vectors in various coord systems.
Make haze glow only pay attention to sun (i.e. fix sun glow when moon is near horizon in daytime).
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/skyF.glsl | 12 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class3/windlight/advancedAtmoF.glsl | 1 |
2 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl index a439aa64d7..0fb990611e 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl @@ -34,6 +34,7 @@ in vec3 view_dir; uniform vec3 cameraPosLocal; uniform vec3 sun_dir; +uniform vec3 moon_dir; uniform float sun_size; uniform sampler2D transmittance_texture; @@ -42,9 +43,9 @@ uniform sampler3D single_mie_scattering_texture; uniform sampler2D irradiance_texture; vec3 GetSolarLuminance(); -vec3 GetSkyLuminance(vec3 camPos, vec3 view_dir, float shadow_length, vec3 sun_dir, out vec3 transmittance); -vec3 GetSkyLuminanceToPoint(vec3 camPos, vec3 pos, float shadow_length, vec3 sun_dir, out vec3 transmittance); -vec3 GetSunAndSkyIlluminance(vec3 pos, vec3 norm, vec3 sun_dir, out vec3 sky_irradiance); +vec3 GetSkyLuminance(vec3 camPos, vec3 view_dir, float shadow_length, vec3 dir, out vec3 transmittance); +vec3 GetSkyLuminanceToPoint(vec3 camPos, vec3 pos, float shadow_length, vec3 dir, out vec3 transmittance); +vec3 GetSunAndSkyIlluminance(vec3 pos, vec3 norm, vec3 dir, out vec3 sky_irradiance); void main() { @@ -55,8 +56,9 @@ void main() vec3 camPos = cameraPosLocal + vec3(0, 0, 6360.0f); vec3 transmittance; vec3 sky_illum; - vec3 radiance = GetSkyLuminance(camPos, view_direction, 0.0f, sun_direction, transmittance); - vec3 radiance2 = GetSunAndSkyIlluminance(camPos, view_direction, sun_direction, sky_illum); + + vec3 radiance_sun = GetSkyLuminance(camPos, view_direction, 0.0f, sun_direction, transmittance); + vec3 radiance2_sun = GetSunAndSkyIlluminance(camPos, view_direction, sun_direction, sky_illum); radiance *= transmittance; diff --git a/indra/newview/app_settings/shaders/class3/windlight/advancedAtmoF.glsl b/indra/newview/app_settings/shaders/class3/windlight/advancedAtmoF.glsl index fed3edf7de..bdb54a1d63 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/advancedAtmoF.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/advancedAtmoF.glsl @@ -33,6 +33,7 @@ in vec3 view_dir; uniform vec3 cameraPosLocal; uniform vec3 sun_dir; +uniform vec3 moon_dir; uniform float sun_size; uniform sampler2D transmittance_texture; |