Commit Graph

52261 Commits (4c6afbbb75076e9fd34ee5707a02195c4e2f7223)

Author SHA1 Message Date
Ansariel 4c6afbbb75 Restore llmath improvements from archived develop branch:
* Make eligible functions constexpr
* Use constants for vector indices where applicable
* Reformat to match actual coding conventions
2025-04-17 19:50:30 +02:00
Ansariel 441c844ec8 Fix lerp issues on newer GCC versions 2025-04-17 18:55:08 +02:00
Ansariel d65de99052 Use standard library functions for llisnan and replace obvious NaN checks that don't work using /fp:fast floating point behavior under MSVC 2025-04-17 18:44:09 +02:00
Jonathan "Geenz" Goodman 293462d8ff
Merge pull request #3883 from williamweaver/fix/remove-duplicate-render-setting
Fix: Remove potentially redundant RenderAutoHideSurfaceAreaLimit sett…
2025-04-15 13:50:39 -04:00
Jonathan "Geenz" Goodman 822cc2a4ee
Merge pull request #3896 from williamweaver/fix/tonemap-hdr-blend
Refactor tonemap blending to preserve HDR detail during mix
2025-04-15 10:31:25 -04:00
Jonathan "Geenz" Goodman d19d44cc72
Merge pull request #3911 from secondlife/main
Merge 2025.03 release into develop.
2025-04-15 10:14:27 -04:00
Jonathan "Geenz" Goodman cf2b4dbfb2
Merge pull request #3706 from secondlife/release/2025.03
Release/2025.03
2025-04-15 09:50:42 -04:00
William Weaver c07817c3d2 Fix(Tonemap): Correct blend logic to preserve HDR detail
The blending operation for the `tonemap_mix` uniform in `postDeferredTonemap.glsl` incorrectly used a prematurely clamped color value as the source for the linear mix target. Specifically, the exposed HDR input color was clamped to the [0, 1] LDR range before being used in the `mix()` function when `tonemap_mix < 1.0`.

This premature clamping resulted in the loss of High Dynamic Range (HDR) detail in highlights during the blend operation. As `tonemap_mix` was reduced, instead of smoothly blending towards the linear scene representation, clipped highlights were incorrectly reintroduced.

This commit modifies the `toneMap` and `toneMapNoExposure` functions to correct this logic:
1.  The original linear input color is preserved before exposure/processing.
2.  The appropriate exposure factor is calculated and applied separately.
3.  The chosen tone mapping operator is applied to the exposed color, storing the result.
4.  The `mix()` function now correctly blends between the appropriately scaled, *unclamped* linear input color and the fully tone-mapped result.
5.  The final clamp to the [0, 1] LDR range is applied *after* the blend operation.

This change ensures that HDR information is preserved throughout the blending process, resulting in a smoother, more perceptually correct visual transition as `tonemap_mix` is adjusted. While the effect is nuanced, it is noticeable in bright highlights; with the legacy code, these highlights appeared visibly clipped and less intense during the blend, whereas the corrected code allows them to retain their peak brightness and detail more accurately. This makes the `tonemap_mix` control more intuitive, behaving as a true intensity blend for the tone mapping effect without introducing clipping artifacts. The computational cost is negligible.
2025-04-11 02:23:52 +03:00
Jonathan "Geenz" Goodman 42dc4501b5
Merge pull request #3853 from williamweaver/fix/cloud-texture-loading
Fix: Apply Cloud Texture Changes from Environment Settings Floater
2025-04-09 17:34:04 -04:00
Andrey Kleshchev 632a8648ca #3892 Crash at fillCompositionLogfont 2025-04-08 23:38:30 +03:00
Jonathan "Geenz" Goodman df1c018bed
Merge pull request #3891 from secondlife/geenz/25.03-feature-table-bump
Bump feature table version.
2025-04-08 13:59:40 -04:00
Jonathan "Geenz" Goodman 9f12c98f6f Bump feature table version. 2025-04-08 13:52:38 -04:00
Maxim Nikolenko 417e0c681e
#3745 fix for showing system notification on login #2 2025-04-08 11:02:26 +03:00
Andrey Kleshchev 75bf8577a1 #3884 Crash in kdu_core::kdu_params::get 2025-04-07 21:13:48 +03:00
Andrey Kleshchev 1df890d75c #3627 std::bad_alloc in EventPoll 2025-04-07 21:13:48 +03:00
Andrey Kleshchev a7a8d6c02e #3627 std::bad_alloc when loading a model 2025-04-07 21:13:48 +03:00
Andrey Kleshchev 40acaafd9c #3878 Crash at LLPipeline::unlinkDrawable
assertInitializedDoError() on shutdown
2025-04-07 21:13:48 +03:00
Andrey Kleshchev 3d7de1b39b #3870 Crash at LLVOAvatarSelf::getJoint()
A long standing one
2025-04-07 21:13:48 +03:00
Andrey Kleshchev 8f6bc554b6 #3868 Crash in updateHoveredState
according to bugsplat mWrapperPanel is null.
2025-04-07 21:13:48 +03:00
Andrey Kleshchev b62aae7959 #3849 Crash at LLSelectMgr::updatePointAt 2025-04-07 21:13:48 +03:00
Andrey Kleshchev 27fd726fae #3846 Crash at updateGLTFMaterials 2025-04-07 21:13:48 +03:00
William Weaver cfbcdd713b Fix: Remove potentially redundant RenderAutoHideSurfaceAreaLimit setting registration
This commit removes a seemingly duplicated `connectRefreshCachedSettingsSafe` call in `LLPipeline::init()` for the `RenderAutoHideSurfaceAreaLimit` setting.

A duplicated registration for this setting was identified during a review of `LLPipeline::init()`. Double registration can lead to unexpected behavior, including potential CPU overhead.

The duplication *may* have been introduced with commit 440c7b2 (Added CollectFontVertexBuffers feature), though this requires further confirmation.

Testing Performed:

After removing the duplicate registration, the `RenderAutoHideSurfaceAreaLimit` functionality was validated by ensuring the following behavior (consistent with the existing code):

* A value of 0 (zero) causes all objects to appear regardless of size.
* Values slightly above zero result in only small objects appearing, with all others hidden.
* Increasing the value causes objects of increasing size to appear, while smaller objects remain visible.

This change merits careful review to ensure it has no unintended side effects, and to confirm the accuracy of these observations from other developers.
2025-04-07 16:57:12 +03:00
Jonathan "Geenz" Goodman be2e7e9d18
Merge pull request #3854 from williamweaver/fix/xui-parsing-fixes
Fix: Resolve Minor XUI Parsing Warnings in Environment Widgets
2025-04-04 14:08:14 -04:00
William Weaver 1fcabcdd32 Fix(EnvAdjust): Properly update sky after cloud texture selection
Problem:
When selecting a new cloud texture in the Personal Lighting floater (LLFloaterEnvironmentAdjust), the sky did not visually update. The code previously only updated LiveSky->setCloudNoiseTextureId() and called mLiveSky->update(), which failed to notify the global LLEnvironment mechanism or the renderer about the new texture.

Cause:
Relying solely on mLiveSky for environment changes is insufficient. To update the live environment layer (ENV_LOCAL) and trigger a render refresh, calls to LLEnvironment::setEnvironment() and LLEnvironment::updateEnvironment() are required.

Solution:
1. Remove an unnecessary null-check for getChild<LLTextureCtrl>, as getChild() never returns null.
2. Clone the current sky settings (mLiveSky->buildClone()) to avoid modifying a shared environment object directly.
3. Apply the new cloud texture ID to the clone.
4. Use LLEnvironment::setEnvironment(ENV_LOCAL, sky_to_set) to apply the updated settings to the user's local environment override.
5. Call LLEnvironment::updateEnvironment(LLEnvironment::TRANSITION_INSTANT, true) to ensure the renderer recognizes and displays the updated texture immediately.
6. Reset the picker control’s value to match the newly applied texture for UI consistency.

Additional Note:
A partial implementation was inadvertently committed earlier (commit`04af042`) due to a local staging error. This commit supersedes that incomplete change by correctly implementing the intended fix.

Result:
Selecting a new cloud texture from LLFloaterEnvironmentAdjust now immediately updates both the in-world sky rendering and the texture preview UI, ensuring consistency and clarity for users.

Testing:
- Open the Personal Lighting floater and select various cloud textures.
- Verify that the sky updates immediately for each new selection.
- Confirm that the texture picker also updates to reflect the selected texture.
2025-04-04 16:02:08 +03:00
William Weaver 7c35a02225
Merge branch 'secondlife:develop' into fix/cloud-texture-loading 2025-04-04 03:06:29 +03:00
Jonathan "Geenz" Goodman 01dc5ae785
Merge pull request #3869 from secondlife/main
Add discord channel for open source discussion.
2025-04-03 12:58:56 -04:00
Jonathan "Geenz" Goodman b7dd677933
Add discord channel for open source discussion. 2025-04-03 12:58:26 -04:00
Hecklezz 2bb4de97e4 Fix normal and specular repeats per meter scaling 2025-04-02 20:05:00 +03:00
William Weaver f0ad01c7dd Merge branch 'fix/xui-parsing-fixes' of https://github.com/williamweaver/viewer into fix/xui-parsing-fixes 2025-04-02 04:23:07 +03:00
William Weaver be595b4403 Fix(XUI): Resolve parsing warnings for Fixed Environment editor widgets
Problem:
Opening the Fixed Environment floater generated three distinct XUI parsing warnings in the logs:
- Failed to parse parameter "decimal_digits." in xy_vector.xml
- Failed to parse parameter "user_resize." in xy_vector.xml
- Failed to parse parameter "logarithmic." in panel_settings_sky_clouds.xml

Cause:
These attributes were either not recognized/utilized by the underlying C++ widget implementations ('decimal_digits', 'user_resize' in LLXYVector) or were using an incorrect value ('logarithmic="1"' instead of a boolean 'true'/'false' in LLSliderCtrl).

Solution:
This commit addresses these three warnings:
- Removed the extraneous 'decimal_digits' and 'user_resize' attributes from the definition of the 'xyvector' widget in xy_vector.xml.
- Corrected the 'logarithmic' attribute value from "1" to "true" for the 'cloud_scroll_xy' slider in panel_settings_sky_clouds.xml.

Result:
Eliminates these specific parsing warnings from the logs when the Fixed Environment floater is opened.

Testing:
- Launch viewer.
- Open World -> Environment Editor -> My Environments.
- Select a sky setting and click Edit (or create a New one).
- Observe the logs upon the Fixed Environment floater opening.
- Verify the absence of the 'decimal_digits', 'user_resize' (from xy_vector.xml), and 'logarithmic' (from panel_settings_sky_clouds.xml) parsing warnings.
2025-04-02 04:09:00 +03:00
William Weaver 61ba4b0d77 Fix(XUI): Remove unrecognized user_resize attribute from sun_moon_trackball
Problem:
A warning "Failed to parse parameter 'user_resize.'" appeared in the logs during UI loading, originating from sun_moon_trackball.xml.

Cause:
The 'user_resize' attribute is not a recognized or utilized parameter for the 'sun_moon_trackball' widget type, as defined in the corresponding C++
(LLVirtualTrackball).

Solution:
Removed the extraneous 'user_resize="false"' line from the sun_moon_trackball.xml widget definition.

Result:
Eliminates the parsing warning from the logs upon viewer startup or UI reload.

Testing:
- Launch viewer.
- Check logs for the absence of the "Failed to parse parameter 'user_resize.'" warning.
2025-04-02 03:45:54 +03:00
William Weaver 04af042435 Fix(EnvAdjust): Ensure cloud texture selection updates the sky
Problem:
When selecting a new cloud texture in the Personal Lighting floater (LLFloaterEnvironmentAdjust) using the cloud map texture picker, the sky rendering did not update to reflect the selected texture. The callback only updated the internal mLiveSky object and its subsequent call to mLiveSky->update() was insufficient to trigger a live render update.

Cause:
The onCloudMapChanged callback modified the mLiveSky settings object directly and called its update() method. However, in the context of live environment adjustments, changes require propagation through the central LLEnvironment singleton to correctly update the active environment layer (ENV_LOCAL) and signal the renderer. Relying solely on the settings object's update() method bypassed this necessary mechanism.

Solution:
This commit refactors onCloudMapChanged to correctly handle the update:
1.  Uses the LLEnvironment singleton to manage the state change:
    - Explicitly targets the local environment layer (ENV_LOCAL) via setSelectedEnvironment().
    - Clones the mLiveSky settings object.
    - Uses LLEnvironment::setEnvironment() to apply the modified clone to the ENV_LOCAL layer.
    - Uses LLEnvironment::updateEnvironment() to trigger the render update.
2.  Synchronizes the UI preview:
    - Calls picker_ctrl->setValue() on the LLTextureCtrl widget after the environment update to ensure the UI preview matches the applied texture.

Result:
Selecting a cloud texture in the Environment Settings floater now correctly updates both the sky rendering and the UI preview widget simultaneously.

Testing:
- Open World -> Environment Editor -> Environment Settings.
- Go to the Clouds tab.
- Click the cloud texture preview to open the texture picker.
- Select a new cloud texture and click OK.
- Verify the sky updates immediately to use the selected texture.
- Verify the texture preview in the floater also updates immediately.
- Repeat with several different textures to confirm consistent behavior.
2025-04-02 02:13:01 +03:00
Andrey Kleshchev 4ddd9d1fef #3814 More bad_alloc handling
warn user and error
2025-03-31 22:43:04 +03:00
Andrey Kleshchev e671cb54fe #3795 Crash at getVolatileAPRPool() 2025-03-30 13:38:34 +03:00
Jonathan "Geenz" Goodman 6110028012
Merge pull request #3719 from williamweaver/fix/shadow-resolution-update
fix: Correctly update shadows on RenderShadowResolutionScale change
2025-03-29 11:04:12 -04:00
Jonathan "Geenz" Goodman b9015dcb80
Merge branch 'develop' into fix/shadow-resolution-update 2025-03-29 10:27:51 -04:00
Andrey Lihatskiy 193cab14c2 #3836 Fix crash at LLNotificationForm::getNumElements()/LLSD::size() 2025-03-29 16:25:17 +02:00
AtlasLinden c555d234f1
Merge pull request #3832 from secondlife/atlas-qaworkflow
Allow QA workflow to run on Second_Life_X branches
2025-03-28 07:31:55 -07:00
William Weaver e1ebb33ab2 fix(pipeline): Remove incorrect zeroing of mRT dimensions in createGLBuffers
Resolves the root cause of shadow rendering failures when changing RenderShadowResolutionScale immediately after modifying other graphics settings (e.g., SSAO, HDR).

Investigation revealed that LLPipeline::createGLBuffers, which is called during certain graphics setting changes that require full buffer recreation, contained lines that incorrectly set mRT->width and mRT->height to zero *after* the call to allocateScreenBuffer had already established the correct dimensions.

This created a state inconsistency. If RenderShadowResolutionScale was changed immediately following the graphics setting change, the subsequent call to LLPipeline::resizeShadowTexture (triggered via handleShadowsResized) would read these incorrect zero dimensions from mRT. This led to failed shadow buffer allocation (allocateShadowBuffer(0, 0)) and resulted in corrupted or missing shadows.

This commit removes the erroneous mRT->width = 0 and mRT->height = 0 lines from the end of createGLBuffers. This ensures that the render target dimensions remain valid after buffer recreation.

With this fix, resizeShadowTexture now correctly reads the valid screen dimensions immediately following a graphics setting change and successfully resizes the shadow buffers without delay or error. This eliminates the need for previous workarounds like guard conditions or forced shader recompiles.

Ref: #3719
2025-03-28 04:28:36 +03:00
AtlasLinden 0a39fe8dc9
Allow QA workflow to run on Second_Life_X branches
Using the echos from the last run, it appears that the tagged builds have Workflow Head Branch = Second_Life_X. 
Edit made so the file looks for this rather than what was there previously.
2025-03-27 15:28:15 -07:00
William Weaver e18577274e
Merge branch 'secondlife:develop' into fix/shadow-resolution-update 2025-03-27 23:58:43 +03:00
Andrey Kleshchev 6ac1d4f3e3 #3829 WebRTC crash OnDataReceivedImpl 2025-03-27 21:29:31 +02:00
AtlasLinden 571e33cd59
Merge pull request #3821 from secondlife/atlas-qaworkflow
Removed unnecessary comments in QA workflow file
2025-03-27 11:47:56 -07:00
Andrey Kleshchev 2b44a97a16 Avoid recalculating pixel area when possible 2025-03-27 18:29:19 +02:00
Andrey Kleshchev d67859e483 Use LLCachedControl in llviewerwindow and llappviewer
Getting from gSavedSettings is expensive to do so often
2025-03-27 18:29:19 +02:00
Maxim Nikolenko 7d5a5e939a
#3820 crash at LLNotificationTemplate 2025-03-27 18:02:19 +02:00
AtlasLinden 51f5b85360
Removed unnecessary comments in QA workflow file
GHA does not like comments inside an if statement. These have been removed.
2025-03-27 06:58:07 -07:00
Jonathan "Geenz" Goodman 7d58d46ec3
Merge pull request #3818 from secondlife/atlas-qaworkflow
Added QA workflow file
2025-03-26 19:41:06 -04:00
Jonathan "Geenz" Goodman 134807e500
Merge pull request #3819 from secondlife/geenz/vram-divisor-1
Mitigate some of the frame stuttering we're seeing by setting the VRAM divisor to 1
2025-03-26 19:11:29 -04:00
Jonathan "Geenz" Goodman 695247539b Mitigate some of the frame stuttering we're seeing by setting the VRAM divisor to 1.
tl;dr - this helps avoid frequent texture reuploads to VRAM in some texture heavy areas.  This speaks to some bigger problems we're seeing in our texture streaming system however.  You will see similar problems by manually setting the texture VRAM manually.
2025-03-26 19:01:30 -04:00