From 6d2714ac85815699599501538a397ccba109c6c6 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 16 Sep 2021 14:22:28 +0100 Subject: SL-15999 - added --noninteractive command line option --- indra/newview/app_settings/cmd_line.xml | 8 ++++++++ indra/newview/app_settings/settings.xml | 11 +++++++++++ 2 files changed, 19 insertions(+) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 4e186292f7..7514913d13 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -217,6 +217,14 @@ NoInventoryLibrary + noninteractive + + desc + Run in semi-headless mode where only login and logout need to work. + map-to + NonInteractive + + nonotifications desc diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b1120c18b2..6ff94e1afd 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7026,6 +7026,17 @@ Value 0 + NonInteractive + + Comment + Run in a semi-headless mode where only logging in and logging out needs to work. + Persist + 1 + Type + Boolean + Value + 0 + NonvisibleObjectsInMemoryTime Comment -- cgit v1.2.3 From 014dd037dde0a93f6c591618e4c111c6b598b60e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 20 Sep 2021 21:22:17 +0000 Subject: SL-16043 Fix DisableVerticalSync, default DisableVerticalSync to off, remove broken frame limiter code (use vsync if you want to limit framerate). --- indra/newview/app_settings/settings.xml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b1120c18b2..05c3fc3bfe 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -812,17 +812,6 @@ Value 0 - FramePerSecondLimit - - Comment - Controls upper limit of frames per second - Persist - 1 - Type - U32 - Value - 120 - BackgroundYieldTime Comment @@ -3366,13 +3355,13 @@ DisableVerticalSync Comment - Update frames as fast as possible (FALSE = update frames between display scans) + Update frames as fast as possible (FALSE = update frames between display scans). Requires restart. Persist 1 Type Boolean Value - 1 + 0 EnableGroupChatPopups -- cgit v1.2.3 From 851fef680164e3472b0516e7237bbcc4a35bc5a3 Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Tue, 28 Sep 2021 15:24:42 -0700 Subject: SL-16102 Set window title to agent name (child of SL-15999 Support for low overhead, non interactive viewer sessions) --- indra/newview/app_settings/settings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6ff94e1afd..5987bc3ddf 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -16666,6 +16666,17 @@ Value 1 + UpdateAppWindowTitleBar + + Comment + Updates the application window title bar with brief information about user/location + Persist + 1 + Type + Boolean + Value + 0 + -- cgit v1.2.3 From d00272e0cc9974f35a46f0c313ee2c0e11cddbda Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 11 Oct 2021 16:03:40 +0000 Subject: SL-16099 Multi-threaded OpenGL usage on Windows, enable Core Profile and VAOs by default. --- indra/newview/app_settings/settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 05c3fc3bfe..d05d100ddf 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9814,7 +9814,7 @@ Type Boolean Value - 0 + 1 RenderGlow @@ -10599,7 +10599,7 @@ Type Boolean Value - 0 + 1 RenderUseTransformFeedback -- cgit v1.2.3 From 75cf90723f63d1d80b2a3b4b8aa9536cadcda8cb Mon Sep 17 00:00:00 2001 From: Runitai Linden Date: Mon, 11 Oct 2021 11:48:43 -0500 Subject: SL-16099 Followup -- disable VAOs since they still run like garbage in busy scenes. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d05d100ddf..eeadea76a2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10599,7 +10599,7 @@ Type Boolean Value - 1 + 0 RenderUseTransformFeedback -- cgit v1.2.3 From eda264c2821a86505b4ec2a898ff3169ab82f895 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 20 Oct 2021 18:38:36 -0400 Subject: SL-16220: Add a WorkQueue to be serviced by mainloop. Make LLAppViewer::idle() call LL::WorkQueue::runFor() to dequeue and run some or all of the pending responses from worker threads. Add a MainWorkTime setting to specify the time slice the main loop may devote each frame to servicing such responses. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 05c3fc3bfe..802453d508 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3858,6 +3858,17 @@ Value 1 + MainWorkTime + + Comment + Max time per frame devoted to mainloop work queue (in milliseconds) + Persist + 1 + Type + F32 + Value + 0.1 + QueueInventoryFetchTimeout Comment -- cgit v1.2.3 From 11afa09ea3f56c0e20eb195ae1520a88602ceaca Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 22 Oct 2021 11:36:31 -0400 Subject: SL-16220: Add LL::ThreadPool class and a "General" instance. ThreadPool bundles a WorkQueue with the specified number of worker threads to service it. Each ThreadPool has a name that can be used to locate its WorkQueue. Each worker thread calls WorkQueue::runUntilClose(). ThreadPool listens on the "LLApp" LLEventPump for shutdown notification. On receiving that, it closes its WorkQueue and then join()s each of its worker threads for orderly shutdown. Add a settings.xml entry "ThreadPoolSizes", the first LLSD-valued settings entry to expect a map: pool name->size. The expectation is that usually code instantiating a particular ThreadPool will have a default size in mind, but it should check "ThreadPoolSizes" for a user override. Make idle_startup()'s STATE_SEED_CAP_GRANTED state instantiate a "General" ThreadPool. This is function-static for lazy initialization. Eliminate LLMainLoopRepeater, which is completely unreferenced. Any potential future use cases are better addressed by posting to the main loop's WorkQueue. Eliminate llappviewer.cpp's private LLDeferredTaskList class, which implemented LLAppViewer::addOnIdleCallback(). Make addOnIdleCallback() post work to the main loop's WorkQueue instead. --- indra/newview/app_settings/settings.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 802453d508..3c7fe174fd 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12663,6 +12663,20 @@ Value 50 + ThreadPoolSizes + + Comment + Map of size overrides for specific thread pools. + Persist + 1 + Type + LLSD + Value + + General + 4 + + ThrottleBandwidthKBPS Comment -- cgit v1.2.3 From 8d20480c5f77fe1fab8149d3cda79bdd61e77656 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 28 Oct 2021 18:06:21 +0000 Subject: SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton --- indra/newview/app_settings/settings.xml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index aeeba58a68..291f0f7d95 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14104,18 +14104,7 @@ Value 1 - RenderSynchronousOcclusion - - Comment - Don't let occlusion queries get more than one frame behind (block until they complete). - Persist - 1 - Type - Boolean - Value - 1 - - RenderDelayVBUpdate + RenderDelayVBUpdate Comment Delay vertex buffer updates until just before rendering -- cgit v1.2.3 From 768b7a4d33b64dc3e9d7f7c0c384bb2aa37b458b Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 9 Nov 2021 17:17:49 +0200 Subject: SL-16330 Clean up vertical sync handling, add to UI --- indra/newview/app_settings/settings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 291f0f7d95..f15b5d0981 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3352,16 +3352,16 @@ Value 0 - DisableVerticalSync + RenderVSyncEnable Comment - Update frames as fast as possible (FALSE = update frames between display scans). Requires restart. + Update frames between display scans (FALSE = Update frames as fast as possible). Persist 1 Type Boolean Value - 0 + 1 EnableGroupChatPopups -- cgit v1.2.3 From 2e2d9b611530bd0113612dbe019c8e413e1bb20e Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Mon, 29 Mar 2021 16:00:19 -0600 Subject: SL-14895, restore previous post-deferred alpha behavior --- .../app_settings/shaders/class1/deferred/alphaF.glsl | 14 +++++++++++--- .../app_settings/shaders/class1/deferred/materialF.glsl | 12 ++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index dc484317e9..d3a05c34c0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -86,6 +86,14 @@ float getAmbientClamp(); vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight, float ambiance) { + // SL-14895 inverted attenuation work-around + // This routine is tweaked to match deferred lighting, but previously used an inverted la value. To reconstruct + // that previous value now that the inversion is corrected, we reverse the calculations in LLPipeline::setupHWLights() + // to recover the `adjusted_radius` value previously being sent as la. + float falloff_factor = (12.0 * fa) - 9.0; + float inverted_la = falloff_factor / la; + // Yes, it makes me want to cry as well. DJH + vec3 col = vec3(0); //get light vector @@ -95,7 +103,7 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec float dist = length(lv); float da = 1.0; - /*if (dist > la) + /*if (dist > inverted_la) { return col; } @@ -113,9 +121,9 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec return col; }*/ - if (dist > 0.0 && la > 0.0) + if (dist > 0.0 && inverted_la > 0.0) { - dist /= la; + dist /= inverted_la; //normalize light vector lv = normalize(lv); diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index e1f7031af6..02d83925ea 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -91,6 +91,14 @@ float getAmbientClamp(); vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spec, vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight, inout float glare, float ambiance) { + // SL-14895 inverted attenuation work-around + // This routine is tweaked to match deferred lighting, but previously used an inverted la value. To reconstruct + // that previous value now that the inversion is corrected, we reverse the calculations in LLPipeline::setupHWLights() + // to recover the `adjusted_radius` value previously being sent as la. + float falloff_factor = (12.0 * fa) - 9.0; + float inverted_la = falloff_factor / la; + // Yes, it makes me want to cry as well. DJH + vec3 col = vec3(0); //get light vector @@ -100,9 +108,9 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe float dist = length(lv); float da = 1.0; - dist /= la; + dist /= inverted_la; - if (dist > 0.0 && la > 0.0) + if (dist > 0.0 && inverted_la > 0.0) { //normalize light vector lv = normalize(lv); -- cgit v1.2.3 From 029b41c0419e975bbb28454538b46dc69ce5d2ba Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Mon, 15 Nov 2021 09:25:35 -0700 Subject: Revert "SL-16220: Merge branch 'origin/DRTVWR-546' into glthread" This reverts commit 5188a26a8521251dda07ac0140bb129f28417e49, reversing changes made to 819088563e13f1d75e048311fbaf0df4a79b7e19. --- indra/newview/app_settings/settings.xml | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 607e531e62..f15b5d0981 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3858,17 +3858,6 @@ Value 1 - MainWorkTime - - Comment - Max time per frame devoted to mainloop work queue (in milliseconds) - Persist - 1 - Type - F32 - Value - 0.1 - QueueInventoryFetchTimeout Comment @@ -12674,20 +12663,6 @@ Value 50 - ThreadPoolSizes - - Comment - Map of size overrides for specific thread pools. - Persist - 1 - Type - LLSD - Value - - General - 4 - - ThrottleBandwidthKBPS Comment -- cgit v1.2.3 From 28f9fb06a9f4cb9edccb2ff8132c7f6a9b27c060 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sat, 20 Nov 2021 18:49:19 +0000 Subject: SL-16289 Rigged mesh rendering overhaul --- indra/newview/app_settings/settings.xml | 24 +------- .../shaders/class1/deferred/alphaV.glsl | 4 +- .../shaders/class1/deferred/bumpSkinnedV.glsl | 64 ------------------- .../shaders/class1/deferred/bumpV.glsl | 22 ++++++- .../shaders/class1/deferred/diffuseSkinnedV.glsl | 59 ------------------ .../shaders/class1/deferred/diffuseV.glsl | 20 +++++- .../shaders/class1/deferred/fullbrightShinyV.glsl | 18 +++++- .../shaders/class1/deferred/fullbrightV.glsl | 13 +++- .../class1/deferred/shadowAlphaMaskSkinnedV.glsl | 70 +++++++++++++++++++++ .../shaders/class1/deferred/shadowSkinnedV.glsl | 52 ++++++++++++++++ .../class1/deferred/treeShadowSkinnedV.glsl | 53 ++++++++++++++++ .../shaders/class1/interface/debugSkinnedV.glsl | 41 +++++++++++++ .../class1/interface/occlusionSkinnedV.glsl | 40 ++++++++++++ .../shaders/class1/lighting/lightFullbrightF.glsl | 1 + .../app_settings/shaders/class1/objects/bumpV.glsl | 13 ++++ .../shaders/class1/objects/emissiveSkinnedV.glsl | 56 ----------------- .../shaders/class1/objects/emissiveV.glsl | 20 ++++-- .../class1/objects/fullbrightShinySkinnedV.glsl | 71 ---------------------- .../shaders/class1/objects/fullbrightShinyV.glsl | 17 +++++- .../shaders/class1/objects/fullbrightSkinnedV.glsl | 57 ----------------- .../shaders/class1/objects/fullbrightV.glsl | 17 ++++-- .../class1/objects/shinySimpleSkinnedV.glsl | 66 -------------------- .../shaders/class1/objects/shinyV.glsl | 20 ++++-- .../shaders/class1/objects/simpleSkinnedV.glsl | 65 -------------------- .../shaders/class1/objects/simpleV.glsl | 18 +++++- 25 files changed, 410 insertions(+), 491 deletions(-) delete mode 100644 indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl delete mode 100644 indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl create mode 100644 indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskSkinnedV.glsl create mode 100644 indra/newview/app_settings/shaders/class1/deferred/shadowSkinnedV.glsl create mode 100644 indra/newview/app_settings/shaders/class1/deferred/treeShadowSkinnedV.glsl create mode 100644 indra/newview/app_settings/shaders/class1/interface/debugSkinnedV.glsl create mode 100644 indra/newview/app_settings/shaders/class1/interface/occlusionSkinnedV.glsl delete mode 100644 indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl delete mode 100644 indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl delete mode 100644 indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl delete mode 100644 indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl delete mode 100644 indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 144323bb11..2d821b7451 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8649,28 +8649,6 @@ - RenderAlphaBatchFullbrights - - Comment - Render fullbright alpha content more efficiently, but with possible visual differences from prev viewers. - Persist - 1 - Type - Boolean - Value - 0 - - RenderAlphaBatchEmissives - - Comment - Render emissive alpha content more efficiently, but with possible visual differences from prev viewers. - Persist - 1 - Type - Boolean - Value - 1 - RenderAnisotropic Comment @@ -10145,7 +10123,7 @@ Type S32 Value - 512 + 4096 RenderNameFadeDuration diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index 506118d381..6a93bc2fd2 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -105,9 +105,9 @@ void main() vec4 vert = vec4(position.xyz, 1.0); pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); -#endif +#endif //IS_AVATAR_SKIN -#endif +#endif // HAS_SKIN #ifdef USE_INDEXED_TEX passTextureIndex(); diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl deleted file mode 100644 index 10144f3e16..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @file bumpV.glsl - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2007, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -uniform mat4 projection_matrix; -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec4 diffuse_color; -ATTRIBUTE vec3 normal; -ATTRIBUTE vec2 texcoord0; -ATTRIBUTE vec4 tangent; - -VARYING vec3 vary_mat0; -VARYING vec3 vary_mat1; -VARYING vec3 vary_mat2; -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - -mat4 getObjectSkinnedTransform(); - -void main() -{ - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - - mat4 mat = getObjectSkinnedTransform(); - - mat = modelview_matrix * mat; - - vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; - - - vec3 n = normalize((mat * vec4(normal.xyz+position.xyz, 1.0)).xyz-pos.xyz); - vec3 t = normalize((mat * vec4(tangent.xyz+position.xyz, 1.0)).xyz-pos.xyz); - vec3 b = cross(n, t) * tangent.w; - - vary_mat0 = vec3(t.x, b.x, n.x); - vary_mat1 = vec3(t.y, b.y, n.y); - vary_mat2 = vec3(t.z, b.z, n.z); - - gl_Position = projection_matrix*vec4(pos, 1.0); - vertex_color = diffuse_color; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl index 9f9749394e..d90891aa20 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl @@ -39,16 +39,32 @@ VARYING vec3 vary_mat2; VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +uniform mat4 modelview_matrix; +#endif + void main() { //transform vertex +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; + gl_Position = projection_matrix*vec4(pos, 1.0); + + vec3 n = normalize((mat * vec4(normal.xyz+position.xyz, 1.0)).xyz-pos.xyz); + vec3 t = normalize((mat * vec4(tangent.xyz+position.xyz, 1.0)).xyz-pos.xyz); +#else gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vec3 n = normalize(normal_matrix * normal); vec3 t = normalize(normal_matrix * tangent.xyz); +#endif + vec3 b = cross(n, t) * tangent.w; - + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; + vary_mat0 = vec3(t.x, b.x, n.x); vary_mat1 = vec3(t.y, b.y, n.y); vary_mat2 = vec3(t.z, b.z, n.z); diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl deleted file mode 100644 index 2487110624..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file diffuseSkinnedV.glsl - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2007, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -uniform mat4 projection_matrix; -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec4 diffuse_color; -ATTRIBUTE vec3 normal; -ATTRIBUTE vec2 texcoord0; - -VARYING vec3 vary_normal; -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - -mat4 getObjectSkinnedTransform(); - -void main() -{ - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - - mat4 mat = getObjectSkinnedTransform(); - - mat = modelview_matrix * mat; - vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; - - vec4 norm = vec4(position.xyz, 1.0); - norm.xyz += normal.xyz; - norm.xyz = (mat*norm).xyz; - norm.xyz = normalize(norm.xyz-pos.xyz); - - vary_normal = norm.xyz; - - vertex_color = diffuse_color; - - gl_Position = projection_matrix*vec4(pos, 1.0); -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl index 3c026796c8..d64bcefade 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl @@ -39,14 +39,28 @@ VARYING vec2 vary_texcoord0; void passTextureIndex(); +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +uniform mat4 modelview_matrix; +#endif + void main() { - //transform vertex +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec4 pos = mat * vec4(position.xyz, 1.0); + gl_Position = projection_matrix * pos; + vary_normal = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz); +#else gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + vary_normal = normalize(normal_matrix * normal); +#endif + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; passTextureIndex(); - vary_normal = normalize(normal_matrix * normal); - + vertex_color = diffuse_color; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl index 8f6eb79668..2c139430e7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl @@ -25,7 +25,6 @@ uniform mat3 normal_matrix; uniform mat4 texture_matrix0; -uniform mat4 texture_matrix1; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; @@ -47,19 +46,32 @@ VARYING vec2 vary_texcoord0; VARYING vec3 vary_texcoord1; VARYING vec4 vary_position; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +#endif + void main() { //transform vertex vec4 vert = vec4(position.xyz,1.0); passTextureIndex(); + +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec4 pos = mat * vert; + vary_position = gl_Position = projection_matrix * pos; + vec3 norm = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz); +#else vec4 pos = (modelview_matrix * vert); vary_position = gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); - vec3 norm = normalize(normal_matrix * normal); +#endif vec3 ref = reflect(pos.xyz, -norm); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texcoord1 = (texture_matrix1*vec4(ref,1.0)).xyz; + vary_texcoord1 = transpose(normal_matrix) * ref.xyz; calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl index bdf3546aa5..e71636f2c9 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl @@ -45,15 +45,26 @@ VARYING vec3 vary_position; VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +#endif void main() { //transform vertex vec4 vert = vec4(position.xyz, 1.0); - vec4 pos = (modelview_matrix * vert); passTextureIndex(); +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec4 pos = mat * vert; + gl_Position = projection_matrix * pos; +#else + vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); +#endif #ifdef WATER_FOG vary_position = pos.xyz; diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskSkinnedV.glsl new file mode 100644 index 0000000000..2b17aea75a --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskSkinnedV.glsl @@ -0,0 +1,70 @@ +/** + * @file shadowAlphaMaskSkinnedV.glsl + * + * $LicenseInfo:firstyear=2021&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; +uniform mat4 projection_matrix; +uniform float shadow_target_width; + +ATTRIBUTE vec3 position; +ATTRIBUTE vec4 diffuse_color; +ATTRIBUTE vec2 texcoord0; + +VARYING vec4 post_pos; +VARYING float target_pos_x; +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; + +void passTextureIndex(); + +mat4 getObjectSkinnedTransform(); + +void main() +{ + //transform vertex + vec4 pre_pos = vec4(position.xyz, 1.0); + + mat4 mat = getObjectSkinnedTransform(); + + mat = modelview_matrix * mat; + + vec4 pos = mat * pre_pos; + pos = projection_matrix * pos; + + target_pos_x = 0.5 * (shadow_target_width - 1.0) * pos.x; + + post_pos = pos; + +#if !defined(DEPTH_CLAMP) + gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w); +#else + gl_Position = pos; +#endif + + passTextureIndex(); + + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; + vertex_color = diffuse_color; +} diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowSkinnedV.glsl new file mode 100644 index 0000000000..bdf8e0854d --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowSkinnedV.glsl @@ -0,0 +1,52 @@ +/** + * @file shadowSkinnedV.glsl + * + * $LicenseInfo:firstyear=2021&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2007, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +uniform mat4 modelview_matrix; +uniform mat4 projection_matrix; + +ATTRIBUTE vec3 position; + +VARYING vec4 post_pos; + +mat4 getObjectSkinnedTransform(); + +void main() +{ + //transform vertex + mat4 mat = getObjectSkinnedTransform(); + + mat = modelview_matrix * mat; + vec4 pos = (mat*vec4(position.xyz, 1.0)); + pos = projection_matrix*pos; + + post_pos = pos; + +#if !defined(DEPTH_CLAMP) + gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w); +#else + gl_Position = pos; +#endif + +} diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeShadowSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeShadowSkinnedV.glsl new file mode 100644 index 0000000000..d9ca6d3a46 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/deferred/treeShadowSkinnedV.glsl @@ -0,0 +1,53 @@ +/** + * @file treeShadowV.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2007, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; +uniform mat4 projection_matrix; + +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; + +VARYING vec4 post_pos; +VARYING vec2 vary_texcoord0; + +mat4 getObjectSkinnedTransform(); + +void main() +{ + //transform vertex + mat4 mat = getObjectSkinnedTransform(); + + mat = modelview_matrix * mat; + + vec4 pos = mat * vec4(position.xyz, 1.0); + pos = projection_matrix * pos; + + post_pos = pos; + + gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w); + + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; +} diff --git a/indra/newview/app_settings/shaders/class1/interface/debugSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/interface/debugSkinnedV.glsl new file mode 100644 index 0000000000..74f22aec4f --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/debugSkinnedV.glsl @@ -0,0 +1,41 @@ +/** + * @file debugSkinnedV.glsl + * + * $LicenseInfo:firstyear=2021&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +uniform mat4 projection_matrix; +uniform mat4 modelview_matrix; + +mat4 getObjectSkinnedTransform(); + +ATTRIBUTE vec3 position; + +void main() +{ + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; + + gl_Position = projection_matrix*vec4(pos, 1.0); +} + diff --git a/indra/newview/app_settings/shaders/class1/interface/occlusionSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/interface/occlusionSkinnedV.glsl new file mode 100644 index 0000000000..7305065a05 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/occlusionSkinnedV.glsl @@ -0,0 +1,40 @@ +/** + * @file occlusionSkinnedV.glsl + * + * $LicenseInfo:firstyear=2021&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2007, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +uniform mat4 projection_matrix; +uniform mat4 modelview_matrix; + +ATTRIBUTE vec3 position; + +mat4 getObjectSkinnedTransform(); + +void main() +{ + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; + gl_Position = projection_matrix*vec4(pos, 1.0); +} + diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl index 5fcdf3107c..89be8195f0 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl @@ -56,5 +56,6 @@ void fullbright_lighting() color.rgb = pow(color.rgb, vec3(1.0/texture_gamma)); frag_color = color; + } diff --git a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl index a7738087dc..ee9970bc70 100644 --- a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl @@ -33,10 +33,23 @@ ATTRIBUTE vec2 texcoord1; VARYING vec2 vary_texcoord0; VARYING vec2 vary_texcoord1; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +uniform mat4 modelview_matrix; +#endif + void main() { //transform vertex +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec4 pos = mat * vec4(position.xyz, 1.0); + gl_Position = projection_matrix * pos; +#else gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); +#endif vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; vary_texcoord1 = (texture_matrix0 * vec4(texcoord1,0,1)).xy; } diff --git a/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl deleted file mode 100644 index 9064904191..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @file emissiveSkinnedV.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2007, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -uniform mat4 projection_matrix; -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec4 emissive; -ATTRIBUTE vec2 texcoord0; - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - - -void calcAtmospherics(vec3 inPositionEye); -mat4 getObjectSkinnedTransform(); - -void main() -{ - //transform vertex - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - - mat4 mat = getObjectSkinnedTransform(); - - mat = modelview_matrix * mat; - vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; - - vertex_color = emissive; - - calcAtmospherics(pos.xyz); - - gl_Position = projection_matrix*vec4(pos, 1.0); -} diff --git a/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl b/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl index e984deb0c8..d762239e51 100644 --- a/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl @@ -37,20 +37,30 @@ VARYING vec2 vary_texcoord0; void calcAtmospherics(vec3 inPositionEye); - - +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +#endif void main() { //transform vertex passTextureIndex(); + +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + + vec4 pos = mat * vec4(position.xyz, 1.0); + gl_Position = projection_matrix * pos; +#else gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0)); +#endif vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0)); + calcAtmospherics(pos.xyz); vertex_color = emissive; - - } diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl deleted file mode 100644 index 1e244d9dfd..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file shinySimpleSkinnedV.glsl - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2007, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -uniform mat4 texture_matrix0; -uniform mat4 texture_matrix1; -uniform mat4 modelview_matrix; -uniform mat4 projection_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec3 normal; -ATTRIBUTE vec4 diffuse_color; -ATTRIBUTE vec2 texcoord0; - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_texcoord1; -VARYING vec4 vary_position; - - -void calcAtmospherics(vec3 inPositionEye); -mat4 getObjectSkinnedTransform(); - -void main() -{ - mat4 mat = getObjectSkinnedTransform(); - - mat = modelview_matrix * mat; - vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; - - mat4 mvp = modelview_matrix * projection_matrix; - vary_position = mvp * vec4(position, 1.0); - - vec4 norm = vec4(position.xyz, 1.0); - norm.xyz += normal.xyz; - norm.xyz = (mat*norm).xyz; - norm.xyz = normalize(norm.xyz-pos.xyz); - - vec3 ref = reflect(pos.xyz, -norm.xyz); - - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texcoord1 = (texture_matrix1*vec4(ref,1.0)).xyz; - - calcAtmospherics(pos.xyz); - - vertex_color = diffuse_color; - - gl_Position = projection_matrix*vec4(pos, 1.0); - - -} diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl index 34bd8d445a..ace2574ac2 100644 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl @@ -25,7 +25,6 @@ uniform mat3 normal_matrix; uniform mat4 texture_matrix0; -uniform mat4 texture_matrix1; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; @@ -46,20 +45,32 @@ VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; VARYING vec3 vary_texcoord1; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +#endif void main() { //transform vertex vec4 vert = vec4(position.xyz,1.0); passTextureIndex(); + +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec4 pos = mat * vert; + gl_Position = projection_matrix * pos; + vec3 norm = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz); +#else vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); - vec3 norm = normalize(normal_matrix * normal); +#endif vec3 ref = reflect(pos.xyz, -norm); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texcoord1 = (texture_matrix1*vec4(ref,1.0)).xyz; + vary_texcoord1 = transpose(normal_matrix) * ref; calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl deleted file mode 100644 index eff75435a9..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @file fullbrightSkinnedV.glsl - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2007, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -uniform mat4 projection_matrix; -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec4 diffuse_color; -ATTRIBUTE vec2 texcoord0; - -void calcAtmospherics(vec3 inPositionEye); -mat4 getObjectSkinnedTransform(); - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - - -void main() -{ - //transform vertex - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - - mat4 mat = getObjectSkinnedTransform(); - - mat = modelview_matrix * mat; - vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; - - calcAtmospherics(pos.xyz); - - vertex_color = diffuse_color; - - gl_Position = projection_matrix*vec4(pos, 1.0); - - -} diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl index fc20d3270e..5af42f1fcf 100644 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl @@ -33,26 +33,33 @@ ATTRIBUTE vec2 texcoord0; ATTRIBUTE vec3 normal; ATTRIBUTE vec4 diffuse_color; - void calcAtmospherics(vec3 inPositionEye); - VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +#endif void main() { //transform vertex vec4 vert = vec4(position.xyz,1.0); passTextureIndex(); - vec4 pos = (modelview_matrix * vert); +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec4 pos = mat * vert; + gl_Position = projection_matrix * pos; +#else + vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); +#endif vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; calcAtmospherics(pos.xyz); vertex_color = diffuse_color; - - } diff --git a/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl deleted file mode 100644 index 727bae19c0..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file shinySimpleSkinnedV.glsl - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2007, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -uniform mat4 projection_matrix; -uniform mat4 texture_matrix0; -uniform mat4 texture_matrix1; -uniform mat4 modelview_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec3 normal; -ATTRIBUTE vec4 diffuse_color; -ATTRIBUTE vec2 texcoord0; - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_texcoord1; - -vec4 calcLighting(vec3 pos, vec3 norm, vec4 color); -void calcAtmospherics(vec3 inPositionEye); -mat4 getObjectSkinnedTransform(); - -void main() -{ - mat4 mat = getObjectSkinnedTransform(); - - mat = modelview_matrix * mat; - vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; - - vec4 norm = vec4(position.xyz, 1.0); - norm.xyz += normal.xyz; - norm.xyz = (mat*norm).xyz; - norm.xyz = normalize(norm.xyz-pos.xyz); - - vec3 ref = reflect(pos.xyz, -norm.xyz); - - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texcoord1 = (texture_matrix1*vec4(ref,1.0)).xyz; - - calcAtmospherics(pos.xyz); - - vec4 color = calcLighting(pos.xyz, norm.xyz, diffuse_color); - vertex_color = color; - - gl_Position = projection_matrix*vec4(pos, 1.0); -} diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl index 4ba8194d03..097e42d233 100644 --- a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl @@ -25,7 +25,6 @@ uniform mat3 normal_matrix; uniform mat4 texture_matrix0; -uniform mat4 texture_matrix1; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; @@ -45,19 +44,32 @@ void calcAtmospherics(vec3 inPositionEye); uniform vec4 origin; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +#endif + void main() { //transform vertex vec4 vert = vec4(position.xyz,1.0); passTextureIndex(); + +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec4 pos = mat * vert; + gl_Position = projection_matrix * pos; + vec3 norm = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz); +#else vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); - vec3 norm = normalize(normal_matrix * normal); +#endif vec3 ref = reflect(pos.xyz, -norm); - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texcoord1 = (texture_matrix1*vec4(ref,1.0)).xyz; + vary_texcoord0 = (texture_matrix0*vec4(texcoord0,0,1)).xy; + vary_texcoord1 = transpose(normal_matrix) * ref; calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl deleted file mode 100644 index df31b5a79f..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @file simpleSkinnedV.glsl - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2007, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; -uniform mat4 projection_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec3 normal; -ATTRIBUTE vec4 diffuse_color; -ATTRIBUTE vec2 texcoord0; - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - - -vec4 calcLighting(vec3 pos, vec3 norm, vec4 color); -void calcAtmospherics(vec3 inPositionEye); -mat4 getObjectSkinnedTransform(); - -void main() -{ - //transform vertex - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - - mat4 mat = getObjectSkinnedTransform(); - - mat = modelview_matrix * mat; - vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; - - vec4 norm = vec4(position.xyz, 1.0); - norm.xyz += normal.xyz; - norm.xyz = (mat*norm).xyz; - norm.xyz = normalize(norm.xyz-pos.xyz); - - calcAtmospherics(pos.xyz); - - vec4 color = calcLighting(pos.xyz, norm.xyz, diffuse_color); - vertex_color = color; - - gl_Position = projection_matrix*vec4(pos, 1.0); - - -} diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl index 9ef7704b70..2025174f7d 100644 --- a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl @@ -44,12 +44,16 @@ void calcAtmospherics(vec3 inPositionEye); VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +#endif + void main() { //transform vertex vec4 vert = vec4(position.xyz,1.0); - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); passTextureIndex(); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy; @@ -58,11 +62,23 @@ void main() if (no_atmo == 1) { vertex_color = diffuse_color; + gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); } else { +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + + vec4 pos = mat * vert; + vec3 norm = normalize((mat*vec4(normal.xyz+vert.xyz,1.0)).xyz-pos.xyz); + + gl_Position = projection_matrix * pos; +#else vec4 pos = (modelview_matrix * vert); vec3 norm = normalize(normal_matrix * normal); + gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); +#endif calcAtmospherics(pos.xyz); -- cgit v1.2.3 From 0b066539fe68dc5750900c3452189645c40adb45 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 24 Nov 2021 10:47:54 -0500 Subject: DRTVWR-546, SL-16220, SL-16094: Undo previous glthread branch revert. Reverting a merge is sticky: it tells git you never want to see that branch again. Merging the DRTVWR-546 branch, which contained the revert, into the glthread branch undid much of the development work on that branch. To restore it we must revert the revert. This reverts commit 029b41c0419e975bbb28454538b46dc69ce5d2ba. --- indra/newview/app_settings/settings.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2d821b7451..058da4b66d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3871,6 +3871,17 @@ Value 1 + MainWorkTime + + Comment + Max time per frame devoted to mainloop work queue (in milliseconds) + Persist + 1 + Type + F32 + Value + 0.1 + QueueInventoryFetchTimeout Comment @@ -12667,6 +12678,20 @@ Value + ThreadPoolSizes + + Comment + Map of size overrides for specific thread pools. + Persist + 1 + Type + LLSD + Value + + General + 4 + + ThrottleBandwidthKBPS Comment -- cgit v1.2.3 From bc9552900339526b241cfd6ee4fb90a498868fd6 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 30 Nov 2021 19:01:33 +0200 Subject: SL-16369 Remove Hardware Skinning setting --- indra/newview/app_settings/high_graphics.xml | 2 -- indra/newview/app_settings/low_graphics.xml | 2 -- indra/newview/app_settings/mid_graphics.xml | 2 -- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/app_settings/ultra_graphics.xml | 2 -- 5 files changed, 19 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/high_graphics.xml b/indra/newview/app_settings/high_graphics.xml index 662f7e39dd..f64937f443 100644 --- a/indra/newview/app_settings/high_graphics.xml +++ b/indra/newview/app_settings/high_graphics.xml @@ -6,8 +6,6 @@ - - diff --git a/indra/newview/app_settings/low_graphics.xml b/indra/newview/app_settings/low_graphics.xml index 0ee8e7a059..b31a040d67 100644 --- a/indra/newview/app_settings/low_graphics.xml +++ b/indra/newview/app_settings/low_graphics.xml @@ -6,8 +6,6 @@ - - diff --git a/indra/newview/app_settings/mid_graphics.xml b/indra/newview/app_settings/mid_graphics.xml index c89e060307..9c2c17fc60 100644 --- a/indra/newview/app_settings/mid_graphics.xml +++ b/indra/newview/app_settings/mid_graphics.xml @@ -6,8 +6,6 @@ - - diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 058da4b66d..167483783e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8840,17 +8840,6 @@ Value 1.0 - RenderAvatarVP - - Comment - Use vertex programs to perform hardware skinning of avatar - Persist - 1 - Type - Boolean - Value - 1 - RenderCompressTextures Comment diff --git a/indra/newview/app_settings/ultra_graphics.xml b/indra/newview/app_settings/ultra_graphics.xml index eb2cd356d9..8462df207b 100644 --- a/indra/newview/app_settings/ultra_graphics.xml +++ b/indra/newview/app_settings/ultra_graphics.xml @@ -6,8 +6,6 @@ - - -- cgit v1.2.3 From e7830b39f01d9f9c82e9e2029634dffb8386b24e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2021 15:07:31 +0000 Subject: SL-16436 and SL-16327 Fix for RenderDebugGL test failures and fix for grey textures --- .../app_settings/shaders/class1/deferred/avatarAlphaShadowF.glsl | 4 ++-- .../app_settings/shaders/class1/deferred/avatarAlphaShadowV.glsl | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaShadowF.glsl index ef49b6f4e8..1b16e4eb09 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaShadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaShadowF.glsl @@ -40,11 +40,11 @@ VARYING vec4 post_pos; VARYING float pos_w; VARYING float target_pos_x; VARYING vec2 vary_texcoord0; -VARYING vec4 vertex_color; +uniform vec4 color; void main() { - float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a * vertex_color.a; + float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a * color.a; if (alpha < 0.05) // treat as totally transparent { diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaShadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaShadowV.glsl index d1d7ece6fe..1c5b142ebd 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaShadowV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaShadowV.glsl @@ -30,7 +30,6 @@ uniform float shadow_target_width; mat4 getSkinnedTransform(); void passTextureIndex(); -ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec3 position; ATTRIBUTE vec3 normal; ATTRIBUTE vec2 texcoord0; @@ -41,7 +40,6 @@ VARYING vec4 post_pos; VARYING float pos_w; VARYING float target_pos_x; VARYING vec2 vary_texcoord0; -VARYING vec4 vertex_color; void main() { @@ -68,7 +66,6 @@ void main() vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vertex_color = diffuse_color; #if !DEPTH_CLAMP post_pos = pos; -- cgit v1.2.3 From 5e5be92d79b6ad49f971e7b2f2ddd359d762c163 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 6 Dec 2021 15:29:34 +0000 Subject: SL-16202 Put Multi-threaded GL behind a feature flag and update featuretable (decruftify settings, compatibility pass). --- indra/newview/app_settings/settings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 167483783e..526d898b33 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9818,7 +9818,18 @@ Type Boolean Value + 0 + + RenderGLMultiThreaded + + Comment + Allow OpenGL to use multiple render contexts (reduces frame stutters from loading textures, doesn't play nice with Intel drivers). + Persist 1 + Type + Boolean + Value + 0 RenderGlow -- cgit v1.2.3 From 1a6ef9a1fbecadaff00b733c51fd6b980905f102 Mon Sep 17 00:00:00 2001 From: Runitai Linden Date: Wed, 8 Dec 2021 15:35:25 -0600 Subject: SL-16468 Fix for crash when enabling highlight transparent (add rigged mesh support to highlight transparent). --- .../app_settings/shaders/class1/interface/highlightV.glsl | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl index 9bf7b60eb7..0b362cf46c 100644 --- a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl @@ -31,10 +31,23 @@ ATTRIBUTE vec2 texcoord0; VARYING vec2 vary_texcoord0; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +uniform mat4 modelview_matrix; +#endif + void main() { //transform vertex +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec4 pos = mat * vec4(position.xyz,1.0); + gl_Position = projection_matrix * pos; +#else gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); +#endif vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; } -- cgit v1.2.3 From 20345827eb5b9ebc658ac506f0d41f2a149d895d Mon Sep 17 00:00:00 2001 From: Runitai Linden Date: Wed, 15 Dec 2021 15:43:23 -0600 Subject: SL-16489 Fix for rigged attachment glow showing up near origin. --- .../app_settings/shaders/class1/deferred/emissiveV.glsl | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl index 5e4f08b017..08b1147ab0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl @@ -40,15 +40,26 @@ vec3 atmosAffectDirectionalLight(float lightIntensity); VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +#endif void main() { //transform vertex - vec4 vert = vec4(position.xyz, 1.0); - vec4 pos = (modelview_matrix * vert); passTextureIndex(); - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + + vec4 pos = mat * vec4(position.xyz, 1.0); + gl_Position = projection_matrix * pos; +#else + gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0)); +#endif vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; -- cgit v1.2.3 From dd032467357a4aaf69c752c13e53122aff6c4755 Mon Sep 17 00:00:00 2001 From: Runitai Linden Date: Fri, 17 Dec 2021 09:26:44 -0600 Subject: SL-16478 Fix for octree and render batch debug display not working with rigged meshes. --- .../shaders/class1/interface/debugSkinnedV.glsl | 41 ---------------------- .../shaders/class1/interface/debugV.glsl | 13 +++++++ 2 files changed, 13 insertions(+), 41 deletions(-) delete mode 100644 indra/newview/app_settings/shaders/class1/interface/debugSkinnedV.glsl (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/interface/debugSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/interface/debugSkinnedV.glsl deleted file mode 100644 index 74f22aec4f..0000000000 --- a/indra/newview/app_settings/shaders/class1/interface/debugSkinnedV.glsl +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @file debugSkinnedV.glsl - * - * $LicenseInfo:firstyear=2021&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -uniform mat4 projection_matrix; -uniform mat4 modelview_matrix; - -mat4 getObjectSkinnedTransform(); - -ATTRIBUTE vec3 position; - -void main() -{ - mat4 mat = getObjectSkinnedTransform(); - mat = modelview_matrix * mat; - vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz; - - gl_Position = projection_matrix*vec4(pos, 1.0); -} - diff --git a/indra/newview/app_settings/shaders/class1/interface/debugV.glsl b/indra/newview/app_settings/shaders/class1/interface/debugV.glsl index f4d704577a..153998f1d5 100644 --- a/indra/newview/app_settings/shaders/class1/interface/debugV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/debugV.glsl @@ -27,8 +27,21 @@ uniform mat4 modelview_projection_matrix; ATTRIBUTE vec3 position; +#ifdef HAS_SKIN +mat4 getObjectSkinnedTransform(); +uniform mat4 projection_matrix; +uniform mat4 modelview_matrix; +#endif + void main() { +#ifdef HAS_SKIN + mat4 mat = getObjectSkinnedTransform(); + mat = modelview_matrix * mat; + vec4 pos = mat * vec4(position.xyz,1.0); + gl_Position = projection_matrix * pos; +#else gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); +#endif } -- cgit v1.2.3 From 12f21640c63af26c32965e3546668bbf1ee32389 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 27 Jan 2022 00:11:37 +0200 Subject: SL-16717 Rename RenderGLCoreProfile to prevent compatibility issues --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0ccf74e923..41422d2330 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9842,7 +9842,7 @@ Value 2.2 - RenderGLCoreProfile + RenderGLContextCoreProfile Comment Don't use a compatibility profile OpenGL context. Requires restart. Basic shaders MUST be enabled. -- cgit v1.2.3 From 9dc8fee0f52b5cf9d0cfc85fd285b3829b165796 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 4 Mar 2022 17:05:05 -0600 Subject: SL-16928 Fix for broken bumpmaps on Intel GPUs --- .../app_settings/shaders/class1/deferred/normgenF.glsl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl index d0c06cd51f..7a941674b8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl @@ -43,18 +43,18 @@ uniform float norm_scale; void main() { - float alpha = texture2D(alphaMap, vary_texcoord0).a; + float c = texture2D(alphaMap, vary_texcoord0).r; - vec3 right = vec3(norm_scale, 0, (texture2D(alphaMap, vary_texcoord0+vec2(stepX, 0)).a-alpha)*255); - vec3 left = vec3(-norm_scale, 0, (texture2D(alphaMap, vary_texcoord0-vec2(stepX, 0)).a-alpha)*255); - vec3 up = vec3(0, -norm_scale, (texture2D(alphaMap, vary_texcoord0-vec2(0, stepY)).a-alpha)*255); - vec3 down = vec3(0, norm_scale, (texture2D(alphaMap, vary_texcoord0+vec2(0, stepY)).a-alpha)*255); + vec3 right = vec3(norm_scale, 0, (texture2D(alphaMap, vary_texcoord0+vec2(stepX, 0)).r-c)*255); + vec3 left = vec3(-norm_scale, 0, (texture2D(alphaMap, vary_texcoord0-vec2(stepX, 0)).r-c)*255); + vec3 up = vec3(0, -norm_scale, (texture2D(alphaMap, vary_texcoord0-vec2(0, stepY)).r-c)*255); + vec3 down = vec3(0, norm_scale, (texture2D(alphaMap, vary_texcoord0+vec2(0, stepY)).r-c)*255); vec3 norm = cross(right, down) + cross(down, left) + cross(left,up) + cross(up, right); norm = normalize(norm); norm *= 0.5; norm += 0.5; - - frag_color = vec4(norm, alpha); + + frag_color = vec4(norm, c); } -- cgit v1.2.3 From 2b2a5da0990def249dc028e0bb842843e51feed1 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 7 Mar 2022 17:16:29 -0600 Subject: SL-16972 Fix for blurry textures when "running out" of system memory. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2212f7fbdf..ebf9bfcfe8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6487,7 +6487,7 @@ Type F32 Value - 1.6 + 4.0 MaxPersistentNotifications -- cgit v1.2.3 From 0e954a9afd7cc300bdd4cadfc25baa7f2607e5a4 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 9 Mar 2022 12:48:52 -0600 Subject: SL-16972 Per feedback from Ansariel, only bump up max heap size on 64-bit builds. --- indra/newview/app_settings/settings.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ebf9bfcfe8..17071d4a65 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6481,13 +6481,24 @@ MaxHeapSize Comment - Maximum heap size (GB) + Maximum heap size on 32-bit builds (GB) Persist 1 Type F32 Value - 4.0 + 1.6 + + MaxHeapSize64 + + Comment + Maximum heap size on 64-bit builds (GB) + Persist + 1 + Type + F32 + Value + 16.0 MaxPersistentNotifications -- cgit v1.2.3 From 43069379a2ed2c290fc51f775ebb1e350303325b Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Fri, 18 Mar 2022 19:58:38 -0700 Subject: SL-16993: Add new shaders for physics hull --- .../shaders/class1/objects/previewPhysicsF.glsl | 42 ++++++++++++++++++++++ .../shaders/class1/objects/previewPhysicsV.glsl | 42 ++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 indra/newview/app_settings/shaders/class1/objects/previewPhysicsF.glsl create mode 100644 indra/newview/app_settings/shaders/class1/objects/previewPhysicsV.glsl (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/objects/previewPhysicsF.glsl b/indra/newview/app_settings/shaders/class1/objects/previewPhysicsF.glsl new file mode 100644 index 0000000000..3a5e6fdf7c --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/objects/previewPhysicsF.glsl @@ -0,0 +1,42 @@ +/** + * @file previewPhysicsF.glsl + * + * $LicenseInfo:firstyear=2022&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2022, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifdef DEFINE_GL_FRAGCOLOR +out vec4 frag_color; +#else +#define frag_color gl_FragColor +#endif + +uniform sampler2D diffuseMap; +uniform vec4 color; + +VARYING vec2 vary_texcoord0; + +//==================================================================================================== + +void main() +{ + frag_color = texture2D(diffuseMap,vary_texcoord0.xy) * color; +} diff --git a/indra/newview/app_settings/shaders/class1/objects/previewPhysicsV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewPhysicsV.glsl new file mode 100644 index 0000000000..913dec83bd --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/objects/previewPhysicsV.glsl @@ -0,0 +1,42 @@ +/** + * @file previewPhysicsV.glsl + * + * $LicenseInfo:firstyear=2022&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2022, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix; + +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; + +VARYING vec2 vary_texcoord0; + +//==================================================================================================== + +void main() +{ + //transform vertex + gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; +} -- cgit v1.2.3 From 41cf9fcb050b682ea8f9a855da33a246b5e169c4 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 24 Mar 2022 14:48:06 -0500 Subject: SL-17028 Fix for inconsistent ordering of transparent rigged meshes and removal of glow-only rigged meshes from depth buffer. --- indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index d3a05c34c0..638a0f4e15 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -215,6 +215,11 @@ void main() float final_alpha = diffuse_linear.a; #ifdef USE_VERTEX_COLOR + if (vertex_color.a <= 0.0) + { // TODO: figure out how to get invisible faces out of + // render batches without breaking glow + discard; + } final_alpha *= vertex_color.a; diffuse_srgb.rgb *= vertex_color.rgb; diffuse_linear.rgb = srgb_to_linear(diffuse_srgb.rgb); @@ -308,7 +313,7 @@ vec3 post_atmo = color.rgb; #endif // WATER_FOG #endif - + frag_color = color; } -- cgit v1.2.3 From 1d057dbba2d5f9c51a533405fea408bff5ff84df Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 11 Apr 2022 15:51:51 -0500 Subject: SL-17173 Impostor quality pass. --- indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 638a0f4e15..38afd82c8d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -56,6 +56,10 @@ VARYING vec3 vary_norm; VARYING vec4 vertex_color; //vertex color should be treated as sRGB #endif +#ifdef FOR_IMPOSTOR +uniform float minimum_alpha; +#endif + uniform mat4 proj_mat; uniform mat4 inv_proj; uniform vec2 screen_res; @@ -204,10 +208,13 @@ void main() // Insure we don't pollute depth with invis pixels in impostor rendering // - if (final_alpha < 0.01) + if (final_alpha < minimum_alpha) { discard; } + + color.rgb = diffuse_srgb.rgb; + color.a = final_alpha; #else vec3 light_dir = (sun_up_factor == 1) ? sun_dir: moon_dir; -- cgit v1.2.3 From e33f23f58a2caa561dfe4b3b114786f40983d136 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 11 Apr 2022 20:06:33 -0500 Subject: SL-17194 Impostor quality pass 2 (and fix for fully transparent rigged attachments rendering to depth buffer) --- .../shaders/class1/deferred/alphaF.glsl | 29 ++++++++++++---------- .../shaders/class1/deferred/impostorF.glsl | 3 +-- 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 38afd82c8d..02b2daf0ac 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -56,7 +56,7 @@ VARYING vec3 vary_norm; VARYING vec4 vertex_color; //vertex color should be treated as sRGB #endif -#ifdef FOR_IMPOSTOR +#ifdef HAS_ALPHA_MASK uniform float minimum_alpha; #endif @@ -195,7 +195,6 @@ void main() #endif vec4 diffuse_srgb = diffuse_tap; - vec4 diffuse_linear = vec4(srgb_to_linear(diffuse_srgb.rgb), diffuse_srgb.a); #ifdef FOR_IMPOSTOR vec4 color; @@ -204,33 +203,37 @@ void main() float final_alpha = diffuse_srgb.a * vertex_color.a; diffuse_srgb.rgb *= vertex_color.rgb; - diffuse_linear.rgb = srgb_to_linear(diffuse_srgb.rgb); // Insure we don't pollute depth with invis pixels in impostor rendering // - if (final_alpha < minimum_alpha) + if (final_alpha < minimum_alpha) { discard; } color.rgb = diffuse_srgb.rgb; color.a = final_alpha; -#else - + +#else // FOR_IMPOSTOR + + vec4 diffuse_linear = vec4(srgb_to_linear(diffuse_srgb.rgb), diffuse_srgb.a); + vec3 light_dir = (sun_up_factor == 1) ? sun_dir: moon_dir; float final_alpha = diffuse_linear.a; #ifdef USE_VERTEX_COLOR - if (vertex_color.a <= 0.0) + final_alpha *= vertex_color.a; + + if (final_alpha < minimum_alpha) { // TODO: figure out how to get invisible faces out of // render batches without breaking glow discard; } - final_alpha *= vertex_color.a; + diffuse_srgb.rgb *= vertex_color.rgb; diffuse_linear.rgb = srgb_to_linear(diffuse_srgb.rgb); -#endif +#endif // USE_VERTEX_COLOR vec3 sunlit; vec3 amblit; @@ -262,13 +265,13 @@ void main() #if !defined(AMBIENT_KILL) color.rgb = amblit; color.rgb *= ambient; -#endif +#endif // !defined(AMBIENT_KILL) vec3 post_ambient = color.rgb; #if !defined(SUNLIGHT_KILL) color.rgb += sun_contrib; -#endif +#endif // !defined(SUNLIGHT_KILL) vec3 post_sunlight = color.rgb; @@ -300,7 +303,7 @@ vec3 post_atmo = color.rgb; // sum local light contrib in linear colorspace #if !defined(LOCAL_LIGHT_KILL) color.rgb += light.rgb; -#endif +#endif // !defined(LOCAL_LIGHT_KILL) // back to sRGB as we're going directly to the final RT post-deferred gamma correction color.rgb = linear_to_srgb(color.rgb); @@ -319,7 +322,7 @@ vec3 post_atmo = color.rgb; color = applyWaterFogView(pos.xyz, color); #endif // WATER_FOG -#endif +#endif // #else // FOR_IMPOSTOR frag_color = color; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl index eb6e56e718..a58cc3d12d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl @@ -54,8 +54,7 @@ void main() vec4 norm = texture2D(normalMap, vary_texcoord0.xy); vec4 spec = texture2D(specularMap, vary_texcoord0.xy); - col.rgb = linear_to_srgb(col.rgb); frag_data[0] = vec4(col.rgb, 0.0); frag_data[1] = spec; - frag_data[2] = vec4(norm.xy,0,0); + frag_data[2] = norm; } -- cgit v1.2.3