Commit Graph

22 Commits (master)

Author SHA1 Message Date
Andrey Kleshchev 9a333e65c4
Merge develop into release/2025.04 2025-04-18 21:36:56 +03:00
Andrey Kleshchev a99c1e36de #3887 Fix clouds not updating
setSelectedEnvironment for a default transition was conflicting with
updateEnvironment for an instant transition.
setSelectedEnvironment already has updateEnvironment, so remove the
update and fix time
2025-04-15 21:40:17 +03: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 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 97826b555b viewer#3169 Legacy settings should no longer be automatically converted 2024-12-10 21:05:41 +02:00
Ansariel 9fdca96f8b Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now 2024-07-08 20:27:14 +02:00
Andrey Lihatskiy c95b4bf3ea Post-merge - trim trailing whitespace 2024-06-10 20:45:59 +03:00
Andrey Lihatskiy 71ed19839e Merge branch 'main' into DRTVWR-600-maint-A
# Conflicts:
#	indra/newview/llappviewer.cpp
#	indra/newview/llfloaterchangeitemthumbnail.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llselectmgr.cpp
#	indra/newview/lltexturectrl.cpp
#	indra/newview/lltexturectrl.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llvovolume.cpp
2024-03-27 00:45:06 +02:00
Ansariel 60d3dd98a4 Convert remaining BOOL to bool 2024-02-21 23:14:31 +02:00
Ansariel a5261a5fa8 Convert BOOL to bool in llui 2024-02-21 03:00:25 +02:00
Andrey Kleshchev 869712e273 SL-20669 Move constants out of settings.xml
UIImgInvisibleUUID doesn't exist
Default normal for material is 'null'
2024-01-24 17:40:01 +02:00
RunitaiLinden 4710fcf167 SL-20456 Fix for probe updates stopping after opening personal lighting or editing a sky setting. 2023-10-23 16:10:10 -05:00
Andrey Kleshchev a95ad7aac7 SL-20337 Add tooltips for HDR Scale and Reflection Probe Ambience environment sliders 2023-09-29 00:05:12 +03:00
RunitaiLinden 3a1b60b2ba SL-19785 Fix for blown out skies from Glow Focus. Add notification when editing legacy skies. 2023-06-22 17:10:24 -05:00
RunitaiLinden 50ec54831d
DRTVWR-559 Revert skies to be very close to release and disable tone mapping when probe ambiance is zero.
Hack for desaturating legacy materials has been removed for performance and quality reasons.

Adds a new setting for auto adjusting legacy skies.  This is the PBR "opt out" button.  If disabled, legacy skies will disable tonemapping, automatic probe ambiance, and HDR/exposure.  If enabled, legacy skies will behave as if probe ambiance and HDR scale are 1.0, and ambient will be cut in half.  

HDR scale will act as a sky brightener, but will automatically adjust dynamic exposure so the sky will be properly exposed.  If you want relatively even exposure all the time, set HDR Scale to 1.0.  If you want a high range of exposures between indoor/dark areas and outdoor/bright areas, increase HDR Scale.

Also tuned up SSAO (thanks Rye!).

Reviewed with Brad.
2023-06-01 19:49:23 -05:00
Mnikolenko Productengine a21ef13880 SL-18907 Add Reflection Probe Ambiance slider to Personal Lighting Floater 2023-01-06 17:58:23 +02:00
Andrey Kleshchev fa35eeecd7 SL-14725 Add elevation and azimuth to local lighting 2021-02-16 12:06:13 +02:00
maxim_productengine fdf0d49614 SL-11279 [EEP] Automatically toggle the beacon checkboxes 2019-05-28 18:06:08 +03:00
maxim_productengine ce9cf1027f SL-10982 [EEP] Personal Lighting - Add options to select water maps / cloud textures 2019-04-22 16:02:53 +03:00
maxim_productengine cc70bf9ea0 SL-10957 [EEP] Add Reset button to revert to shared environment 2019-04-16 16:26:52 +03:00
Rider Linden 28fd43a161 OSX hates unused variables 2019-04-03 15:48:52 -07:00
Rider Linden e24237b6af SL-10189, SL-10880: Mark the day instance so that it does not try to reanimate a day cycle when setting a fixed sky. Add new floater for setting the shared environment to local and allowing modifications. 2019-04-03 14:52:59 -07:00