secondlife / jira-archive

2 stars 0 forks source link

[BUG-234564] [PBR] Shadows missing in the latest PBR RC viewer (7.0.0.581886) #11466

Open sl-service-account opened 11 months ago

sl-service-account commented 11 months ago

What just happened?

With recent changes to shaders (the culprit commit is https://github.com/secondlife/viewer/commit/e02dc20b9db4c6ec192b2c68c4c732a26296fc20 ), shadows all but vanished for many objects (in particular avatars and trees, but not only them) and the remaining shadows lost all their density, appearing "washed out".

What were you doing when it happened?

Rendering any outdoor scene with shadows enabled.

What were you expecting to happen instead?

That shadows render like they do with the SL release viewer.

See the attached screen shots:

Attachments

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-234564 | | Summary | [PBR] Shadows missing in the latest PBR RC viewer (7.0.0.581886) | | Type | Bug | | Priority | Unset | | Status | Accepted | | Resolution | Triaged | | Labels | pbr | | Reporter | Henri Beauchamp (henri.beauchamp) | | Created at | 2023-10-18T10:43:37Z | | Updated at | 2023-12-10T13:51:47Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2023-10-18T12:27:20.509-0500', "Is there anything you'd like to add?": 'Legacy avatar body shading also degraded very badly with commit https://github.com/secondlife/viewer/commit/e02dc20b9db4c6ec192b2c68c4c732a26296fc20 (follow the link to the comment I made in the commit to see the screen shots demonstrating this) but I saw a newer commit that *might* fix it, and that I did not yet test.\r\n\r\nAlso, there is something amiss, beside shadows and avatar body shading, with the glass transparency of the roof (see screen shots attached here), when the new Midday default settings (with HDR tone mapping) is applied, which does not happen with the legacy Midday settings.\r\n\r\nFinally, pretty please, at looooooong last, do correct the bogus 0.0, 0.0 cloud scroll rate in your midday settings: the Windlight midday had scroll rate set to 0.2, 0.01, and there was obviously a mistake when "translating" those into their Extended Environment settings counterparts; this can be seen in LL\'s viewer sources, at line 720 of indra/llinventory/llsettingssky.cpp: it reads "dfltsetting[SETTING_CLOUD_SCROLL_RATE] = llsd::array(0.0f, 0.0f);" when it should be "dfltsetting[SETTING_CLOUD_SCROLL_RATE] = llsd::array(0.2, 0.01);". The same bad scroll rate values are obviously set for the default midday sky settings, that also need fixing as a result...', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'System': 'SL Viewer', 'Target Viewer Version': 'viewer-development', 'What just happened?': 'With recent changes to shaders (the culprit commit is https://github.com/secondlife/viewer/commit/e02dc20b9db4c6ec192b2c68c4c732a26296fc20 ), shadows all but vanished for many objects (in particular avatars and trees, but not only them) and the remaining shadows lost all their density, appearing "washed out".', 'What were you doing when it happened?': 'Rendering any outdoor scene with shadows enabled.', 'What were you expecting to happen instead?': 'That shadows render like they do with the SL release viewer.\r\n\r\nSee the attached screen shots:\r\n- The first (Shadows-release-viewer-midday.jpg) was taken with the current release viewer and midday settings; it is the reference for what shadows should look like.\r\n- The second (Shadows-release-viewer-midday.jpg) was taken with the latest PBR RC viewer and (new/HDR) midday environment settings.\r\n- The third (Shadows-pbr-viewer-midday-legacy.jpg) was taken with the latest PBR RC viewer and legacy midday environment settings.', 'Where': 'Anywhere in SL, on Agni or Aditi alike, GLTF-enabled server or not (not a server issue).', } ```
sl-service-account commented 11 months ago

Dan Linden commented at 2023-10-18T17:27:21Z

Thank you for the report, Henri!

sl-service-account commented 9 months ago

Henri Beauchamp commented at 2023-12-10T12:04:20Z, updated at 2023-12-10T13:47:34Z

Addendum:

I finally backported the bogus code to my own viewer, because this is a prerequisite to backporting other fixes to the PBR rendering mode and could therefore not maintain a status quo.

{}But{}, I changed the value of a few (two for shadows, plus one for sky color that also got ruined) settings to recover part of the shadows, in most circumstances (with, sadly, some drawbacks in some specific lighting conditions):