diff options
author | Rider Linden <rider@lindenlab.com> | 2018-07-10 23:04:45 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-07-10 23:04:45 +0000 |
commit | 658b2be775f3c33f4a23d6023a96741eee1849e5 (patch) | |
tree | c631eafd8cb162112536d586624278a16efd16a6 /indra/newview | |
parent | 7724ace15248fefe35b7e1d567554833d6817f68 (diff) | |
parent | 5fade93da8a1b832a1dbfd494a18e7b441b5feab (diff) |
Merged in graham_linden/viewer-eep-graham (pull request #23)
Render fixes and performance improvement for advanced atmo codepath
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/starsF.glsl | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/skyF.glsl | 8 | ||||
-rw-r--r-- | indra/newview/llvosky.cpp | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl index d6a1edbf42..d7f655709c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl @@ -44,7 +44,7 @@ void main() { vec4 col_a = texture2D(diffuseMap, vary_texcoord0.xy); vec4 col_b = texture2D(diffuseMap, vary_texcoord0.xy); - vec4 col = mix(col_a, col_b, blend_factor); + vec4 col = mix(col_b, col_a, blend_factor); col.rgb *= vertex_color.rgb; col.a *= custom_alpha; frag_color = col; diff --git a/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl index 0fb990611e..43c0505046 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl @@ -60,17 +60,17 @@ void main() 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; + radiance_sun *= transmittance; vec3 solar_luminance = transmittance * GetSolarLuminance(); // If the view ray intersects the Sun, add the Sun radiance. if (dot(view_direction, sun_direction) >= sun_size) { - radiance = radiance + solar_luminance; + radiance_sun = radiance_sun + solar_luminance; } - vec3 color = radiance; + vec3 color = radiance_sun; color = vec3(1.0) - exp(-color * 0.0001); @@ -79,7 +79,7 @@ void main() frag_color.rgb = color; //frag_color.rgb = vec3(dot(view_direction, sun_direction) > 0.95f ? 1.0 : 0.0, 0,0); - frag_color.rgb = normalize(view_pos); + //frag_color.rgb = normalize(view_pos); frag_color.a = 1.0; } diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index e099b410bf..1b1c167410 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -815,8 +815,8 @@ void LLVOSky::setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_tex LLUUID moon_tex = moon_texture.isNull() ? psky->GetDefaultMoonTextureId() : moon_texture; LLUUID moon_tex_next = moon_texture_next.isNull() ? (moon_texture.isNull() ? psky->GetDefaultMoonTextureId() : moon_texture) : moon_texture_next; - mMoonTexturep[0] = LLViewerTextureManager::getFetchedTexture(moon_tex, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - mMoonTexturep[1] = LLViewerTextureManager::getFetchedTexture(moon_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + mMoonTexturep[0] = moon_tex.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_tex, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + mMoonTexturep[1] = moon_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); if (mFace[FACE_MOON]) { @@ -862,8 +862,8 @@ void LLVOSky::setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_ LLUUID bloom_tex = bloom_texture.isNull() ? psky->GetDefaultBloomTextureId() : bloom_texture; LLUUID bloom_tex_next = bloom_texture_next.isNull() ? (bloom_texture.isNull() ? psky->GetDefaultBloomTextureId() : bloom_texture) : bloom_texture_next; - mBloomTexturep[0] = LLViewerTextureManager::getFetchedTexture(bloom_tex, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - mBloomTexturep[1] = LLViewerTextureManager::getFetchedTexture(bloom_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + mBloomTexturep[0] = bloom_tex.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + mBloomTexturep[1] = bloom_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); if (mBloomTexturep[0]) { |