From c7ddba7eb4b4e47b0a9371fef41339f7941eefdb Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 16 May 2022 16:02:38 -0500 Subject: SL-17417 Fix for incorrect reflection orientation on some moving child prims. --- .../app_settings/shaders/class1/deferred/fullbrightShinyV.glsl | 3 ++- .../newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl | 3 ++- indra/newview/app_settings/shaders/class1/objects/shinyV.glsl | 3 ++- indra/newview/lldrawpoolbump.cpp | 4 ++++ 4 files changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl index 2c139430e7..3bd6b693fa 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl @@ -25,6 +25,7 @@ uniform mat3 normal_matrix; uniform mat4 texture_matrix0; +uniform mat4 texture_matrix1; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; @@ -71,7 +72,7 @@ void main() vec3 ref = reflect(pos.xyz, -norm); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texcoord1 = transpose(normal_matrix) * ref.xyz; + vary_texcoord1 = (texture_matrix1 * vec4(ref,1.0)).xyz; calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl index ace2574ac2..891515ab1e 100644 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl @@ -25,6 +25,7 @@ uniform mat3 normal_matrix; uniform mat4 texture_matrix0; +uniform mat4 texture_matrix1; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; @@ -70,7 +71,7 @@ void main() vec3 ref = reflect(pos.xyz, -norm); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texcoord1 = transpose(normal_matrix) * ref; + vary_texcoord1 = (texture_matrix1 * vec4(ref,1.0)).xyz; calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl index 097e42d233..3ad7bcaa50 100644 --- a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl @@ -25,6 +25,7 @@ uniform mat3 normal_matrix; uniform mat4 texture_matrix0; +uniform mat4 texture_matrix1; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; @@ -69,7 +70,7 @@ void main() vec3 ref = reflect(pos.xyz, -norm); vary_texcoord0 = (texture_matrix0*vec4(texcoord0,0,1)).xy; - vary_texcoord1 = transpose(normal_matrix) * ref; + vary_texcoord1 = (texture_matrix1 * vec4(ref,1.0)).xyz; calcAtmospherics(pos.xyz); diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 2892fc6f9f..ef38b77922 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -311,6 +311,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di shader->uniform4fv(LLViewerShaderMgr::SHINY_ORIGIN, 1, vec4.mV); if (shader_level > 1) { + cube_map->setMatrix(1); // Make sure that texture coord generation happens for tex unit 1, as that's the one we use for // the cube map in the one pass shiny shaders cube_channel = shader->enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP); @@ -319,6 +320,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di } else { + cube_map->setMatrix(0); cube_channel = shader->enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP); diffuse_channel = -1; cube_map->enable(cube_channel); @@ -332,6 +334,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di diffuse_channel = -1; gGL.getTexUnit(0)->disable(); cube_map->enable(0); + cube_map->setMatrix(0); gGL.getTexUnit(0)->bind(cube_map); } } @@ -390,6 +393,7 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& // Moved below shader->disableTexture call to avoid false alarms from auto-re-enable of textures on stage 0 // MAINT-755 cube_map->disable(); + cube_map->restoreMatrix(); } } -- cgit v1.2.3 From c6fe446c3a047fd7e7841d960f35369ec957b9cc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 16 May 2022 23:21:50 +0300 Subject: SL-17415 Movement of scripted attached objects is no longer interpolated. --- indra/newview/llvoavatar.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index ccb1662139..701a0b5b13 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2847,9 +2847,17 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) } } - - attached_object->mDrawable->makeActive(); - attached_object->mDrawable->updateXform(TRUE); + // if selecting any attachments, update all of them as non-damped + if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() && LLSelectMgr::getInstance()->getSelection()->isAttachment()) + { + gPipeline.updateMoveNormalAsync(attached_object->mDrawable); + } + else + { + // Note: SL-17415; While most objects follow joints, + // some objects get position updates from server + gPipeline.updateMoveDampedAsync(attached_object->mDrawable); + } // override_bbox calls movePartition() and getSpatialPartition(), // so bridge might no longer be valid, get it again. -- cgit v1.2.3 From 85b3f707d3f6fbe39a0d372cfb6c029367f68a24 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 17 May 2022 13:23:08 -0500 Subject: SL-17421 Fix for fullbright alpha mask shader ignoring vertex alpha --- .../shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl index 1855cfceeb..690821bb56 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl @@ -43,14 +43,14 @@ VARYING vec2 vary_texcoord0; void fullbright_lighting() { - vec4 color = diffuseLookup(vary_texcoord0.xy); + vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color; if (color.a < minimum_alpha) { discard; } - color.rgb *= vertex_color.rgb; + //color.rgb *= vertex_color.rgb; color.rgb = pow(color.rgb, vec3(texture_gamma)); -- cgit v1.2.3 From c1deab5ba7595f5094313bb9002411c11bb00745 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 18 May 2022 15:55:24 -0500 Subject: SL-17417 Fix for incorrect reflection orientation on fullbright prims. --- indra/newview/lldrawpoolbump.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index ef38b77922..8db6a10e26 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -464,6 +464,7 @@ void LLDrawPoolBump::beginFullbrightShiny() LLVector4 vec4(vec, gShinyOrigin.mV[3]); shader->uniform4fv(LLViewerShaderMgr::SHINY_ORIGIN, 1, vec4.mV); + cube_map->setMatrix(1); // Make sure that texture coord generation happens for tex unit 1, as that's the one we use for // the cube map in the one pass shiny shaders gGL.getTexUnit(1)->disable(); @@ -524,6 +525,7 @@ void LLDrawPoolBump::endFullbrightShiny() if( cube_map ) { cube_map->disable(); + cube_map->restoreMatrix(); shader->unbind(); } -- cgit v1.2.3 From bf183ecff76809674f4fb0fa302138d554bc3628 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 18 May 2022 17:56:54 -0500 Subject: SL-17449 Fix for Alexa's hair --- indra/newview/llspatialpartition.h | 17 +++++++++++++++++ indra/newview/llvoavatar.cpp | 8 ++++++++ indra/newview/pipeline.cpp | 4 ++++ 3 files changed, 29 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index acfcd63686..6d3ef33801 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -255,6 +255,19 @@ public: } }; + struct CompareRenderOrder + { + bool operator()(const LLSpatialGroup* const& lhs, const LLSpatialGroup* const& rhs) + { + if (lhs->mAvatarp != rhs->mAvatarp) + { + return lhs->mAvatarp < rhs->mAvatarp; + } + + return lhs->mRenderOrder > rhs->mRenderOrder; + } + }; + typedef enum { GEOM_DIRTY = LLViewerOctreeGroup::INVALID_STATE, @@ -338,6 +351,10 @@ public: F32 mPixelArea; F32 mRadius; + + //used by LLVOAVatar to set render order in alpha draw pool to preserve legacy render order behavior + LLVOAvatar* mAvatarp = nullptr; + U32 mRenderOrder = 0; } LL_ALIGN_POSTFIX(64); class LLGeometryManager diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 701a0b5b13..314c22eb6c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2809,6 +2809,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) // update attachments positions if (detailed_update) { + U32 draw_order = 0; for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter) @@ -2875,6 +2876,13 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) bridge->setState(LLDrawable::MOVE_UNDAMPED); bridge->updateMove(); bridge->setState(LLDrawable::EARLY_MOVE); + + LLSpatialGroup* group = attached_object->mDrawable->getSpatialGroup(); + if (group) + { //set draw order of group + group->mAvatarp = this; + group->mRenderOrder = draw_order++; + } } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 20d6fe39e3..da16c8209f 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3877,7 +3877,11 @@ void LLPipeline::postSort(LLCamera& camera) if (!sShadowRender) { + // order alpha groups by distance std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater()); + + // order rigged alpha groups by avatar attachment order + std::sort(sCull->beginRiggedAlphaGroups(), sCull->endRiggedAlphaGroups(), LLSpatialGroup::CompareRenderOrder()); } LL_PUSH_CALLSTACKS(); -- cgit v1.2.3 From 3365a39080744af0566adb7b6efd8e53fc6b3339 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 19 May 2022 14:02:48 -0500 Subject: SL-17451 Fix for erroneous attempt to apply vertex color alpha to texture before alpha masking (we don't actually support this and the vertex color alpha is sometimes zero when you think it ought not be). --- .../shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl index 690821bb56..ad2170bbd3 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl @@ -43,14 +43,14 @@ VARYING vec2 vary_texcoord0; void fullbright_lighting() { - vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color; + vec4 color = diffuseLookup(vary_texcoord0.xy); if (color.a < minimum_alpha) { discard; } - //color.rgb *= vertex_color.rgb; + color *= vertex_color; color.rgb = pow(color.rgb, vec3(texture_gamma)); -- cgit v1.2.3 From cdbd06e8ed6e3f4285a61f5c0b607a65dfdf8dfd Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 25 May 2022 19:22:09 -0400 Subject: Increment viewer version to 6.6.1 following promotion of DRTVWR-546 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 826f5ce030..09a7391e4e 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.6.0 +6.6.1 -- cgit v1.2.3