-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Environment
Second Life Test 7.2.2.252770827 (64bit)
Release Notes
CPU: 12th Gen Intel(R) Core(TM) i7-12700K (3609.6 MHz)
Memory: 32474 MB
OS Version: Microsoft Windows 11 64-bit (Build 26100.6725)
Graphics Card Vendor: ATI Technologies Inc.
Graphics Card: AMD Radeon RX 6600
Windows Graphics Driver Version: 32.0.21025.10016
OpenGL Version: 4.6.0 Core Profile Context 25.9.1.250822
Window size: 1920x1009
Font Size Adjustment: 96pt
UI Scaling: 1
Draw distance: 256m
Bandwidth: 10000kbit/s
LOD factor: 2
Render quality: 6
Texture memory: 8146MB
Disk cache: Max size 3494.4 MB (0.0% used)
J2C Decoder Version: OpenJPEG runtime: 2.5.3
Audio Driver Version: OpenAL, version 1.1 ALSOFT 1.24.2 / OpenAL Community / OpenAL Soft: OpenAL Soft
Dullahan: 1.21.0.202508272159
CEF: 139.0.28+g55ab8a8+chromium-139.0.7258.139
Chromium: 139.0.7258.139
LibVLC Version: 3.0.21
Voice Server Version:
October 06 2025 13:48:25
Description
When you look at the SceneLoadRearMaxRadiusFraction value stored in the settings.xml, you will notice that the value is set to 75.0 for a float value. And the comments mention it is suppose to be fraction.
The code that uses it is for scaling the amount of the scene behind the visible camera is loaded. The issue is because the calculation no longer is divided by 100.0f, the draw distance is multiplied by the value and then clamped at the draw distance value. So it is effectively only ever the draw distance and not the default 75% of it. So a 256 draw distance is locked at 256 meters instead of 192.
This causes more objects to load behind the user, especially very far objects which can cause more RAM and VRAM usage, especially on teleport.
With current 75.0 value:
With new 0.75 value:
The code that was changed is in commit:
8ef25a6
Original code, note the read_max_radius_frac * gAgentCamera.mDrawDistance / 100.0f:
// a percentage of draw distance beyond which all objects outside of view frustum will be unloaded, regardless of pixel threshold
static LLCachedControl<F32> rear_max_radius_frac(gSavedSettings,"SceneLoadRearMaxRadiusFraction");
sRearFarRadius = llmax(rear_max_radius_frac * gAgentCamera.mDrawDistance / 100.f, 1.0f); //minimum value is 1.0m
sRearFarRadius = llmax(sRearFarRadius, (F32)min_radius); //can not be less than "SceneLoadMinRadius".
sRearFarRadius = llmin(sRearFarRadius, gAgentCamera.mDrawDistance); //can not be more than the draw distance.
New Code from above commit: Note the rear_max_radius_frac * gAgentCamera.mDrawDistance with no "/ 100.0f"
// a percentage of draw distance beyond which all objects outside of view frustum will be unloaded, regardless of pixel threshold
static LLCachedControl<F32> rear_max_radius_frac(gSavedSettings,"SceneLoadRearMaxRadiusFraction");
const F32 min_radius_plus_one = sNearRadius + 1.f;
const F32 max_radius = rear_max_radius_frac * gAgentCamera.mDrawDistance;
const F32 clamped_max_radius = llclamp(max_radius, min_radius_plus_one, draw_radius); // [sNearRadius, mDrawDistance]
sRearFarRadius = min_radius_plus_one + ((clamped_max_radius - min_radius_plus_one) * adjust_factor);
Reproduction steps
- Optional: Clear cache (it makes it easier to test out).
- Load Viewer
- Select a region where there are a lot of objects that are behind the user when first loaded.
- Turn on the Texture Console under Develop->Consoles->Texture
- Take note of the # of Textures, Texture VRAM and System Free RAM after all textures are loaded.
- Exit the viewer
- Edit the setting.xml and change the value for SceneLoadRearMaxRadiusFraction from 75.0 to 0.75.
- Optional: Clear cache again
- Load the viewer
- Login to the same region and location (Use last location)
- Turn on the Texture Console again
- Take note of the new # of textures, Texture VRAM and System Free RAM after all textures are loaded.
This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting
/reward 100 (replace 100 with the amount).🕵️♂️ If someone starts working on this issue to earn the rewards, they can comment
/try to let everyone know!🙌 And when they open the PR, they can comment
/claim #4794 either in the PR description or in a PR's comment.🪙 Also, everyone can tip any user commenting
/tip 20 @minerjr (replace 20 with the amount, and @minerjr with the user to tip).📖 If you want to learn more, check out our documentation.