diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-03-28 09:46:09 -0700 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-03-28 09:46:09 -0700 |
commit | 320beaad855f253d36dbb8e1e9a891cc4525494e (patch) | |
tree | 6eca57bbae09437c3b02ee77975f9102fe33e5e7 /indra/newview | |
parent | 08cd239c5f8f4b67b22372e7e608d9ec8e21a26c (diff) | |
parent | 9bf08f553aa59122a606487f1b28bd6083d9f966 (diff) |
Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/skyV.glsl | 8 | ||||
-rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 2 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e0662b8115..d6af39f97e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10356,7 +10356,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>16</real> + <real>8</real> </map> <key>RenderTonemapper</key> <map> diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl index 1424b57d6f..f028b303f7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl @@ -32,8 +32,8 @@ ATTRIBUTE vec3 position; /////////////////////////////////////////////////////////////////////////////// // Output parameters -VARYING vec3 vary_HazeColor; -VARYING float vary_LightNormPosDot; +out vec3 vary_HazeColor; +out float vary_LightNormPosDot; // Inputs uniform vec3 camPosLocal; @@ -56,6 +56,8 @@ uniform float max_y; uniform vec3 glow; uniform float sun_moon_glow_factor; +uniform int cube_snapshot; + // NOTE: Keep these in sync! // indra\newview\app_settings\shaders\class1\deferred\skyV.glsl // indra\newview\app_settings\shaders\class1\deferred\cloudsV.glsl @@ -90,6 +92,8 @@ void main() // Initialize temp variables vec3 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color; + float scale = cube_snapshot*0.75+1; + sunlight *= scale; // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index acbc349567..b49fe35851 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -139,6 +139,8 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca sky_shader->bind(); + sky_shader->uniform1i(LLShaderMgr::CUBE_SNAPSHOT, gCubeSnapshot ? 1 : 0); + LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); LLViewerTexture* rainbow_tex = gSky.mVOSkyp->getRainbowTex(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index a53b3aac8e..7a5443825d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -338,7 +338,7 @@ bool addDeferredAttachments(LLRenderTarget& target, bool for_impostor = false) bool valid = true && target.addColorAttachment(GL_RGBA) // frag-data[1] specular OR PBR ORM && target.addColorAttachment(GL_RGBA16F) // frag_data[2] normal+z+fogmask, See: class1\deferred\materialF.glsl & softenlight - && target.addColorAttachment(GL_RGB16); // frag_data[3] PBR emissive + && target.addColorAttachment(GL_RGB16F); // frag_data[3] PBR emissive return valid; } |