Added new boost levels for Tree, Grass and Light textures (More for tracking as they have custom hard coded values for the mPixelArea which causes issues with loading of sizes.
Added adjustments for the calcPixelArea and calcImportanceToCamera as well as getTextureVirtualSize
Added virtual texture size updates for Media textures
Added code to scale down off screen textures (saves a lot of texture VRAM.
Added additional features for the LLViewerTextureList::Dump
Only issue is server controlled textures which animate tend to load low quality, then upscale as well as Sculpted Volume's which force textures to reload.
This merges in the V1.0 poser + changes since the last beta
* a UI refactor (from angeldark raymaker)
* unified undo/redo history (angeldark raymaker)
* toggle to allow enable/disable of visual manipulator (beq)
* undo/redo keyboard accelerator support (ctrl-z/ctrl-y)
* improved focus loss/gain handing
TODO: when another tool is used (edit tools) the floater still thinks visuals are active, toggling it fixes this but it can be handled better
This reverts commit f2b751419f, reversing
changes made to 4520e92f21.
While this does fix the problem, it ignores the reason why a deferred resize was previously employed.
The correct fix is to fix the broken display() function.
Added new calculation to the LLCamera for draw distance multiplier
Removed the Inverse aspect as not longer used
Modified the LLFace to no long user the inverse aspect.
Updated mInFrustum to use mImportanceToCamera as it was correct
LLViewerCamera removed the mCosCameraFOV (not used anymore)
Added LLViewerMenu option under Developer->Dump->Texture List to dump texture list to info for debugging.
LLViewerTexture viewer for LOD textures, now loops to make the texture fit to cover the max discard value instead of calculating with logs and divisions.
LLViewerTextureList updated to to dump texture list to the Infos, and updated to boost for not only textures based upon the importance to the camera, but to boost a second time for textures close to the camera. Also capped the mMaxVirtualSize to try to help track down texture size changes
Updated LLPipeline to use same getDrawDistanceMultiplier as the texture calcPixelArea code.
Fixed up animations to always be running, so they should not stutter or be in odd places when turning the camera.
May need to revise the mInFrustum as trying to make sure it's within the actual visual location. Need to test with
Changed the textures to divide the texture vsize by the Aspect Ratio and Fields of view. to better control when a texture needs to be scaled down.
Fixed issue when low screen image size could cause an assert on the on screen console due to negative sizes(Calculated to -30 from the value and code that uses the negative location
Updated the logic in LLViewerObjectList to fix the issue of mObjects being modified at possibly any time by the code it calling.
Detailed description of the changes.
This commit addresses an issue where Screen Space Ambient Occlusion (SSAO) appearance was inconsistent, particularly in high-resolution snapshots compared to the main viewer window.
Previously, the SSAO radii parameters (RenderSSAOScale and RenderSSAOMaxScale) were directly applied to the shader without considering the resolution difference between the viewer window and the render target (snapshot). This resulted in SSAO appearing too small and under-sampled in high-resolution snapshots, as the sampling radius was not scaled up to match the larger snapshot resolution.
To resolve this, a scaling factor is now calculated based on the ratio of the viewer window's height to the snapshot's height:
scale_factor = viewer_window_height / snapshot_height
This scale factor is then used to divide the user-defined SSAO radius values before they are passed to the shader. When the snapshot resolution is higher than the viewer resolution, the `scale_factor` becomes less than 1. Dividing by this factor effectively increases the SSAO radii, ensuring the ambient occlusion effect scales proportionally to the higher resolution.
For example, if the viewer is running at 1080p height and a snapshot is taken at 4096p height, the scale factor would be approximately 1080 / 4096 ≈ 0.2637. Dividing the SSAO radii by 0.2637 results in multiplying them by approximately 3.79, thus scaling up the SSAO effect to maintain visual consistency in the high-resolution snapshot.
Intended Impact & Benefits:
- **Visual Consistency:** Ensures that the SSAO effect maintains a consistent visual scale and intensity between the interactive viewer display and high-resolution snapshots, providing a more predictable and professional output.
- **Improved User Experience:** Users capturing high-resolution snapshots will now experience a more accurate and visually pleasing SSAO effect, preventing the unintended diminishment of ambient occlusion and preserving the intended scene aesthetics.
- **Balanced Quality Across Resolutions:** The fix dynamically adjusts the SSAO radii based on resolution, maintaining a balanced and consistent level of detail and intensity across varying output resolutions without requiring manual user adjustments.
Testing:
- **Build:** Rebuild the Aperture Viewer after applying this commit.
- **Run:** Launch the viewer and ensure that Screen Space Ambient Occlusion (SSAO) is enabled in the graphics settings.
- **Visual Comparison (Viewer vs. High-Resolution Snapshot):**
1. In the viewer, observe the appearance of SSAO in a scene with noticeable ambient occlusion effects.
2. Take a high-resolution snapshot to disk (e.g., 4096p or higher).
3. Compare the SSAO effect in the saved snapshot image to the SSAO in the live viewer window. The SSAO in the snapshot should now appear visually consistent in scale and intensity with the viewer, and not diminished or under-sampled.
- **Resolution Variation (Recommended):** Test with different viewer window sizes (e.g., 720p, 1080p) and snapshot resolutions (including resolutions higher than the viewer) to verify that the SSAO consistency is maintained across a range of rendering targets.
Documentation:
- No specific updates to the Wiki are required as this commit is a bug fix that improves the existing SSAO feature's consistency.
- It is recommended to include a note about this fix in the Viewer release notes to inform users about the improved SSAO behavior in high-resolution snapshots.
Shadows were not updating correctly when the RenderShadowResolutionScale setting was changed in-session, leading to broken shadows.
This commit changes the signal listener for "RenderShadowResolutionScale" in llviewercontrol.cpp from `handleShadowsResized` to `handleSetShaderChanged`.
`handleSetShaderChanged` ensures a full shader update, which is necessary for this setting to take effect immediately, similar to other render settings like RenderDeferredSSAO.
This fix ensures shadows update correctly when the resolution scale is changed without requiring a viewer restart.