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.
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.
Refined the logic for the textures to include animated textures to not be downscaled They are not forced to be high boost level.
Update the logic of how to process the on screen max vsize to be simpler.
Added split time max_time for the updateImagesCreateTextures, as originally they were two different functions and can save doubled the time for each.
Added time limit on LLViewerObjectList::updateApparentAngles, as it it affects the Textures in the texture list and worked on a fixed # of objects per frame and each object is variable in the amount of processing required, affecting frame rate and # of textures updated.
Updated the math to remove the need to store the variable and use it again
Updated the "TextureCameraBoost" to default to 7, as we add 1 to the value now instead of using max (TextureCameraBoost, 1.0f)
Cleaned up the logic to be 1, cleaner and 2, more performant.
Moved allocations outside the loop as well as the static texture_camera_boost setup as it should be only done once and not every time a face is on screen.
Cleaned up switch statements into couple of if statements as switch logic would be only good if only 1 level to be used.
Added new logic in the LLViewerTextureList::updateImageDecodePriority method to better handle the texture quality.
- Apply new rules to bias discard, there are now 2 bias, off-screen and on-screen.
On-screen Bias
Only applied to LOD Textures and one that have Discard > 1 (0, 1 protected)
- Off-screen Bias
Will be using the old method of applying the mMaxVirtualSize, however
only on LOD textures and fetched textures get bias applied.
Local (UI & Icons), Media and Dynamic textures should not have any discard applied to them.
Without this, textures will become blurry that are on screen, which is one of the #1 user complaints.
So now, only LOD textures will change on screen, except for Fetched textures when the bias is greater then 2.00.
Also made possible fix for edge case of multiple faces for 1 texture, the last face dictates which happens to the texture. Now any that are in camera will flip signal that it is on screen.
System can be made to be be flexible.
To test out, Go to Preferences->Graphics->Rendering Settings and move the VRAM override to the far left. Then walk around and try to notice if there are any downscaled or blurry textures. To test a blurry object. Right click on it and pick edit. All of the game objects will have a max quality texture applied. Click off and see if the texture on the object changes quality to a blurred mess.
* OpenGL 3.3 compatibility pass. Fix for FBO driven downscaling corrupting textures.
* Increase maximum texture bias, immediately scale down when textures are loaded higher resolution than desired
* #2590 Fix for some frame stalls on Intel Macs
- Use GL_NVX_gpu_memory_info when available
- Disable transparent water on Mid+ and lower
- Adjust GPU benchmark to better tell the truth
- Texture bias tune up
- viewer-private/#277 - Report foreground_time in viewer stats
* #2315 WIP -- Clean up deletion rules in texture list. Incidental decruft.
* Touch up assertions.
* Move mLastReferencedTimer to LLViewerMediaTexture since it's no longer used by LLViewerTexture
In a previous PR, I noted:
Note this change moves the calcPixelArea() call to the top BEFORE we user getPixelArea(). Either that call is entirely redundant (i.e. if calc was called earlier in the frame) or we were using the stale pixelArea (one frame behind). If the former is true then it might be faster to just do an AABB frustum check.
It turns out that by moving the calcPixelArea to the "correct place", we break the rezzing of particles which are then being downsampled as a result. Moving this back to the "incorrect" location undoes the immediate effect but this whole scenario may need to be re-examined.