Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2025-02-13 10:40:42



Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Unusual shadow/brightness behavior in v1.30.2.20 
Author Message

Joined: 2016-06-19 21:33:37
Posts: 384
Location: Columbus area, OH, USA
Reply with quote
Something has seemed off to me about version .20 but I couldn't quite identify what it was. It seems that for faces with transparency set > 0, ALM and shadows (at least sun & moon), face brightness and shadows render oddly at different distances or angles. Very noticeable as the sun & moon positions move through the sky, as well. I have added a few images from 1.30.2.20, from a sandbox, of a cube with a semi-transparent texture AND faces transparency set to 10. I first noticed on the mesh hair I wear. v1.30.2.19 doesn't do this, from the testing I have done. Happy to provide more info.


Attachments:
File comment: Shadow stripes as if an object is between it and the light source but there is not
17f07440093f65e1f0c330ec04e0ffc0.jpg
17f07440093f65e1f0c330ec04e0ffc0.jpg [ 39.8 KiB | Viewed 3475 times ]
File comment: Normal looking at this distance angle
e4496d23ba3a34310a9bdc06de94ccbf.jpg
e4496d23ba3a34310a9bdc06de94ccbf.jpg [ 34.7 KiB | Viewed 3475 times ]
File comment: Shadow stripes as if an object is between it and the light source but there is not
acb15960e1303206ee1c4e5211c3d1fd.jpg
acb15960e1303206ee1c4e5211c3d1fd.jpg [ 33 KiB | Viewed 3475 times ]
2023-07-20 13:30:10
Profile

Joined: 2009-03-17 18:42:51
Posts: 5912
Reply with quote
Hard for me to diagnose the bug without precise reproduction steps or a repro object/location...

Also, what OS are you using, what GPU, drivers, etc: please provide the required information, including the viewer log (something could be amiss with shaders, for example, and would show in the log).

As far as what I can guess from the changes that went into v1.30.2.20, I see two potential suspects (code resyncs with LL's, one of which I already reverted for next release because it feels bogus to me), but unless you can recompile the viewer yourself, it won't help much... Still, here they are in case you can recompile and test the changes:

  • Lines 6754 to 6757 of linden/indra/newview/llvovolume.cpp, you could try and revert that change I already reverted. Instead of:
    Code:
                   else if (!restricted_vision &&   // mk
                          (tep->getShiny() > 0 ||
                           matp->getEnvironmentIntensity() > 0.f))
    revert to:
    Code:
                   else if (!restricted_vision &&   // mk
                          (tep->getShiny() > 0 ||
                           matp->getSpecularID().notNull()))
  • In the same file, lines 6819 to 6830, enclose that block with #if 0/#endif to read:
    Code:
    #if 0
                   // *HACK: this should also never happen, but sometimes we
                   // get here and the material thinks it has a specmap now
                   // even though it did not appear to have a specmap when the
                   // face was added to the list of faces.
                   U32 vb_mask = facep->getVertexBuffer()->getTypeMask();
                   if ((mask & LLVertexBuffer::TYPE_TEXCOORD2) &&
                      !(vb_mask & LLVertexBuffer::MAP_TEXCOORD2))
                   {
                      mask &= ~LLVertexBuffer::TYPE_TEXCOORD2;
                   }
    #endif

However, those changes should normally only affect objects with material (or with alpha masking set instead of alpha blending, since it implicitly turns the objects texture to a material).

Another modification that went into v1.30.2.20 was clearly cited in the change log. It deals with objects bin radius calculation. What happens if you set the "UseNewBinRadiusCompute" debug setting to FALSE before logging in ?...


2023-07-20 17:22:11
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 384
Location: Columbus area, OH, USA
Reply with quote
Normally I copy the info block and include, sorry about that:
Code:
Cool VL Viewer v1.30.2.20, 64 bits, Jul 15 2023 09:16:58
Release notes

CPU: AMD Ryzen 7 3700X 8-Core Processor (4374 MHz)
Memory: 64206MB
OS version: Linux-x86_64 v6.3.12-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul  6 04:05:18 UTC 2023
Memory manager: jemalloc v5.3.1-20230704
Graphics: NVIDIA GEFORCE GTX 1080 TI/PCIE/SSE2
OpenGL version: 4.6.0 NVIDIA 535.86.05
Detected VRAM: 11264MB
J2C decoder: OpenJPEG: 1.4.0.635f
Audio driver: OpenAL v1.1 ALSOFT 1.23.1 (OpenAL Soft: OpenAL Soft)
Networking backend: libcurl 7.47.0/OpenSSL 1.0.2u/zlib 1.2.11.zlib-ng
Browser plugin: Dullahan 1.13.1/CEF 115.3.3/Chromium 115.0.5790.40

Built with: GCC v7.5.0
Compiler-generated maths: SSE2.

Compile flags used for this build:
-O3 -fno-delete-null-pointer-checks -fno-ipa-cp-clone -fno-align-labels -fno-align-loops -fsched-pressure -frename-registers -fweb -fira-hoist-pressure -DNDEBUG -std=c++17 -fno-stack-protector -U_FORTIFY_SOURCE -fno-threadsafe-statics -fPIC -pipe -g -gdwarf-4 -fno-var-tracking-assignments -fexceptions -fno-strict-aliasing -fvisibility=hidden -fsigned-char -m64 -mfpmath=sse -fno-math-errno -fno-trapping-math -pthread -Wall -Wno-reorder -Werror -DLL_LINUX=1 -DLL_JEMALLOC=1 -DLL_FMOD=1 -DLL_OPENAL=1
I attached a log from a short session, logging into my Linden Home parcel. I have seen the behavior across SL. The images I included before were created at one of the sandbox regions Main Channel Sandbox A with no one else around nor any objects and EE set to 09:00 (via Lua). I do compile the viewer myself and will try out the alterations and report back.


Attachments:
CoolVLViewer.zip [27.17 KiB]
Downloaded 99 times
2023-07-20 17:59:59
Profile

Joined: 2016-06-19 21:33:37
Posts: 384
Location: Columbus area, OH, USA
Reply with quote
Toggling the UseNewBinRadiusCompute doesn't seem to impact what I'm seeing. I also patched lines mentioned but it doesn't seem to change the behavior either. I'll keep trying come up with more reproducible steps. I wonder if it is maybe linked to my graphics settings. I can work on capturing a video, if seeing the effect in 'action' would help.


2023-07-20 19:29:21
Profile

Joined: 2009-03-17 18:42:51
Posts: 5912
Reply with quote
ZaneZimer wrote:
I can work on capturing a video, if seeing the effect in 'action' would help.
Yes, it would definitely help...


2023-07-20 20:04:33
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 384
Location: Columbus area, OH, USA
Reply with quote
I managed to figure out how to make some animated GIFs. The quality isn't great but does illustrate the face brightness changes and striations that occur just on caming/zooming around two, interlocked, partially transparent cubes with a default 'white-transparent' texture on their faces.
https://ibb.co/1v2mVVt
https://ibb.co/Qd1jKZR


2023-07-20 22:21:19
Profile

Joined: 2016-06-19 21:33:37
Posts: 384
Location: Columbus area, OH, USA
Reply with quote
As a comparison in 1.30.2.19.
https://ibb.co/x59d4HK


2023-07-20 22:27:46
Profile

Joined: 2009-03-17 18:42:51
Posts: 5912
Reply with quote
Well, I do not quite manage to reproduce it here with v1.30.2.20 (probably need to have very specific transparency and/or texture on objects ?).

But there is an alpha sorting issue (that existed for years) solved for v1.30.2.21 already.

I will post a link in PM for you to test a pre-release of the latter, so that you can check whether it fixes it for you or not.

Yet, the reason why you see this happening in v1.30.2.20 and not v1.30.2.19 is still a mystery for me... :?


2023-07-20 22:56:51
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 384
Location: Columbus area, OH, USA
Reply with quote
Unfortunately the test build shows the same issue for me. I will send you my test cube and landmark to one of the sandboxes I have used to reproduce. I will also upload a zipped copy of my settings here. Centering on the cube then and zooming in and out, rotating to get various angles results in the effect. It seems easier for me to see when I have the environment set to midnight such that the moon is directly above. I see it in other situations as well but the contrast is better 'at night'.


2023-07-20 23:49:09
Profile

Joined: 2009-03-17 18:42:51
Posts: 5912
Reply with quote
There are times, like that, when my brain farts (and man, does it stink !)... :o

Line 446 of linden/indra/newview/llviewershadermgr.cpp, replace "llmin" with "llmax" to read:
Code:
      S32 max_tex = llmax(1, gSavedSettings.getU32("RenderMaxTextureIndex"));

It is amazing that the viewer can still work fine when limited to just one texture index, lol !

I am going to publish a fixed version today, since this is a serious bug.

Well spotted issue, and thank you !


2023-07-21 09:18:26
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 135 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.