[FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
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.master
parent
fb675c42f8
commit
87eb902f7a
|
|
@ -566,7 +566,12 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, const LLFontGL* font, L
|
|||
if ( !force_resize )
|
||||
{
|
||||
if ( mMaxWidth >= 0.0f
|
||||
&& mMaxWidth < screen_width )
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
//&& mMaxWidth < screen_width)
|
||||
// If viewer window was made as small as possible with the console enabled, it would cause an assert error
|
||||
// as the line below can go as small as -38
|
||||
&& mMaxWidth < screen_width || screen_width <= 30)
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
{
|
||||
return; //No resize required.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,11 @@ class LLDrawInfo;
|
|||
class LLMeshSkinInfo;
|
||||
|
||||
const F32 MIN_ALPHA_SIZE = 1024.f;
|
||||
const F32 MIN_TEX_ANIM_SIZE = 512.f;
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
//const F32 MIN_TEX_ANIM_SIZE = 512.f;
|
||||
// Change the min size to
|
||||
const F32 MIN_TEX_ANIM_SIZE = 64.f;
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
const U8 FACE_DO_NOT_BATCH_TEXTURES = 255;
|
||||
|
||||
class alignas(16) LLFace
|
||||
|
|
|
|||
|
|
@ -889,7 +889,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent, F32 max_time)
|
|||
max_value = (S32)mObjects.size();
|
||||
LLTimer timer;
|
||||
// If the number of objects since last being in here has changed (IE objects deleted, then reset the lazy update index)
|
||||
if (mCurLazyUpdateIndex > max_value)
|
||||
if (mCurLazyUpdateIndex >= max_value)
|
||||
{
|
||||
mCurLazyUpdateIndex = 0;
|
||||
}
|
||||
|
|
@ -898,6 +898,12 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent, F32 max_time)
|
|||
// loop over number of objects in the BIN (128), or below until we run out of time
|
||||
while(num_updates < NUM_BINS)
|
||||
{
|
||||
// Moved to the first to fix up the issue of access violation if the object list chaanges size during processing.
|
||||
if (i >= (S32)mObjects.size())
|
||||
{
|
||||
// Reset the index if we go over the max value
|
||||
i = 0;
|
||||
}
|
||||
objectp = mObjects[i];
|
||||
if (objectp != nullptr && !objectp->isDead())
|
||||
{
|
||||
|
|
@ -906,12 +912,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent, F32 max_time)
|
|||
objectp->setPixelAreaAndAngle(agent); // Also sets the approx. pixel area
|
||||
objectp->updateTextures(); // Update the image levels of textures for this object.
|
||||
}
|
||||
i++;
|
||||
// Reset the index if we go over the max value
|
||||
if (i == max_value)
|
||||
{
|
||||
i = 0;
|
||||
}
|
||||
i++;
|
||||
|
||||
num_updates++;
|
||||
// Escape either if we run out of time, or loop back onto ourselves.
|
||||
|
|
|
|||
|
|
@ -980,6 +980,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
|
|||
//F32 vsize = face->getPixelArea();
|
||||
//on_screen = face->mInFrustum;
|
||||
vsize = face->getPixelArea();
|
||||
// Apply the Aspect ratio and field of view to the vsize, this allows the texture to be in the same space as the face, IE the face has
|
||||
// based around LLCamera::calculateFrustumPlanes
|
||||
vsize = vsize * mAspectRatioFOVRemove;
|
||||
current_on_screen = face->mInFrustum; // Create a new var to store the current on screen status
|
||||
on_screen_count += current_on_screen; // Count the number of on sceen faces instead of using brach
|
||||
important_to_camera = face->mImportanceToCamera; // Store so we don't have to do 2 indirects later on
|
||||
|
|
@ -1295,7 +1298,13 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
|
|||
|
||||
typedef std::vector<LLPointer<LLViewerFetchedTexture> > entries_list_t;
|
||||
entries_list_t entries;
|
||||
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
// Pre-calculate current aspect ratio and FOV so we can use to remove from the Faces used for updating the textures
|
||||
// This is used per face per texture, so it can cave a bunch of divisions as well as acessing the values from
|
||||
// the camera singleton.
|
||||
LLViewerCamera* camera = LLViewerCamera::getInstance(); // Store the
|
||||
mAspectRatioFOVRemove = 1.0f / (camera->getAspect() * ((F32)tanf(0.5f * camera->getView())));
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
// update N textures at beginning of mImageList
|
||||
U32 update_count = 0;
|
||||
static const S32 MIN_UPDATE_COUNT = gSavedSettings.getS32("TextureFetchUpdateMinCount"); // default: 32
|
||||
|
|
|
|||
|
|
@ -235,6 +235,11 @@ public:
|
|||
// <FS:Ansariel> Fast cache stats
|
||||
static U32 sNumFastCacheReads;
|
||||
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
// Store the camera's aspect ratio and fov
|
||||
F32 mAspectRatioFOVRemove;
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
|
||||
private:
|
||||
typedef std::map< LLTextureKey, LLPointer<LLViewerFetchedTexture> > uuid_map_t;
|
||||
uuid_map_t mUUIDMap;
|
||||
|
|
|
|||
|
|
@ -2754,12 +2754,19 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU
|
|||
LL_DEBUGS("Avatar") << avString() << "get old-bake image from host " << uuid << LL_ENDL;
|
||||
LLHost host = getObjectHost();
|
||||
result = LLViewerTextureManager::getFetchedTexture(
|
||||
uuid, FTT_HOST_BAKE, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host);
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
//uuid, FTT_HOST_BAKE, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host);
|
||||
uuid, FTT_HOST_BAKE, true, LLGLTexture::BOOST_AVATAR_BAKED, LLViewerTexture::LOD_TEXTURE, 0, 0, host);
|
||||
// <FS:minerjr> [FIRE-35081]
|
||||
// </FS:Ansariel> [Legacy Bake]
|
||||
}
|
||||
LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << LL_ENDL;
|
||||
result = LLViewerTextureManager::getFetchedTextureFromUrl(
|
||||
url, FTT_SERVER_BAKE, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid);
|
||||
// <FS:minerjr>
|
||||
//url, FTT_SERVER_BAKE, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid);
|
||||
// Change the texture from LOD to AVATAR_BAKED.
|
||||
url, FTT_SERVER_BAKE, true, LLGLTexture::BOOST_AVATAR_BAKED, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid);
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
if (result->isMissingAsset())
|
||||
{
|
||||
result->setIsMissingAsset(false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue