From 9da66a1005c83254d828d1c0b88db8889d15276c Mon Sep 17 00:00:00 2001 From: Rye Date: Tue, 7 Oct 2025 11:14:16 -0400 Subject: [PATCH 1/6] Fix GL assert due to unbinding incorrect texture target type --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e8cf67f939..d938567920 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9463,7 +9463,7 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader) void LLPipeline::unbindReflectionProbes(LLGLSLShader& shader) { - S32 channel = shader.disableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP); + S32 channel = shader.disableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY); if (channel > -1 && mReflectionMapManager.mTexture.notNull()) { mReflectionMapManager.mTexture->unbind(); From 1afe1c95dda592381dc04578f35aabef6a271b84 Mon Sep 17 00:00:00 2001 From: Rye Date: Tue, 7 Oct 2025 11:14:46 -0400 Subject: [PATCH 2/6] Bump irradiance map back up to 64x64 to improve IBL quality --- indra/newview/llreflectionmapmanager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llreflectionmapmanager.h b/indra/newview/llreflectionmapmanager.h index 9e55f5c6ea..aa9199b62a 100644 --- a/indra/newview/llreflectionmapmanager.h +++ b/indra/newview/llreflectionmapmanager.h @@ -38,7 +38,7 @@ class LLViewerObject; #define LL_MAX_REFLECTION_PROBE_COUNT 256 // reflection probe resolution -#define LL_IRRADIANCE_MAP_RESOLUTION 16 +#define LL_IRRADIANCE_MAP_RESOLUTION 64 // reflection probe mininum scale #define LL_REFLECTION_PROBE_MINIMUM_SCALE 1.f; From a84ef80585e1f1a989f5c01aa9212828a32557c7 Mon Sep 17 00:00:00 2001 From: Rye Date: Tue, 7 Oct 2025 11:15:29 -0400 Subject: [PATCH 3/6] Bump cubemap arrays RGB type back to 16F for improved HDR color precision during IBL --- indra/llrender/llcubemaparray.cpp | 2 +- indra/newview/llreflectionmapmanager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llrender/llcubemaparray.cpp b/indra/llrender/llcubemaparray.cpp index 0c9d28dac3..b56410b58b 100644 --- a/indra/llrender/llcubemaparray.cpp +++ b/indra/llrender/llcubemaparray.cpp @@ -156,7 +156,7 @@ void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, bool us bind(0); free_cur_tex_image(); - U32 format = components == 4 ? GL_RGBA16F : GL_R11F_G11F_B10F; + U32 format = components == 4 ? GL_RGBA16F : GL_RGB16F; if (!hdr) { format = components == 4 ? GL_RGBA8 : GL_RGB8; diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index eb7fe06e7d..822a44ab82 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -274,7 +274,7 @@ void LLReflectionMapManager::update() if (!mRenderTarget.isComplete()) { - U32 color_fmt = render_hdr ? GL_R11F_G11F_B10F : GL_RGB8; + U32 color_fmt = render_hdr ? GL_RGB16F : GL_RGB8; U32 targetRes = mProbeResolution * 4; // super sample mRenderTarget.allocate(targetRes, targetRes, color_fmt, true); } @@ -287,7 +287,7 @@ void LLReflectionMapManager::update() mMipChain.resize(count); for (U32 i = 0; i < count; ++i) { - mMipChain[i].allocate(res, res, render_hdr ? GL_R11F_G11F_B10F : GL_RGB8); + mMipChain[i].allocate(res, res, render_hdr ? GL_RGB16F : GL_RGB8); res /= 2; } } From 56881624e254d4976dbfdeeab2b49e52b3c00777 Mon Sep 17 00:00:00 2001 From: Rye Date: Tue, 7 Oct 2025 11:16:26 -0400 Subject: [PATCH 4/6] Disable cubemap array copy constructor due to GL errors --- indra/newview/llreflectionmapmanager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 822a44ab82..f6e43e13dc 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -1442,6 +1442,7 @@ void LLReflectionMapManager::initReflectionMaps() mTexture->getWidth() != mProbeResolution || mReflectionProbeCount + 2 != mTexture->getCount()) { +#if 0 // LLCubeMapArray copy critically flawed if (mTexture) { mTexture = new LLCubeMapArray(*mTexture, mProbeResolution, mReflectionProbeCount + 2); @@ -1449,6 +1450,7 @@ void LLReflectionMapManager::initReflectionMaps() mIrradianceMaps = new LLCubeMapArray(*mIrradianceMaps, LL_IRRADIANCE_MAP_RESOLUTION, mReflectionProbeCount); } else +#endif { mTexture = new LLCubeMapArray(); From 338d7dc5158a32d6d374d8f443a7d75ca4f3df05 Mon Sep 17 00:00:00 2001 From: Rye Date: Tue, 7 Oct 2025 11:17:04 -0400 Subject: [PATCH 5/6] Fix using physicsextensions_tpv package --- indra/cmake/LLPhysicsExtensions.cmake | 8 +++++++- indra/newview/CMakeLists.txt | 11 ----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index f9a9a0efb9..549bf4c07c 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -23,9 +23,15 @@ if (HAVOK) use_prebuilt_binary(llphysicsextensions_source) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src) target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions) + target_compile_definitions( llphysicsextensions_impl INTERFACE LL_HAVOK=1 ) elseif (HAVOK_TPV) use_prebuilt_binary(llphysicsextensions_tpv) - target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv) + if(WINDOWS) + target_link_libraries( llphysicsextensions_impl INTERFACE ${ARCH_PREBUILT_DIRS}/llphysicsextensions_tpv.lib) + else() + target_link_libraries( llphysicsextensions_impl INTERFACE ${ARCH_PREBUILT_DIRS}/libllphysicsextensions_tpv.a) + endif() + target_compile_definitions( llphysicsextensions_impl INTERFACE LL_HAVOK=1 ) else (HAVOK) use_prebuilt_binary(llphysicsextensions_stub) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f5c17524c2..57d0609fd9 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1839,17 +1839,6 @@ if (WINDOWS) list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES}) endif (WINDOWS) -if (HAVOK OR HAVOK_TPV) - set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_HAVOK") -endif (HAVOK OR HAVOK_TPV) - -if( DEFINED LLSTARTUP_COMPILE_FLAGS ) - # progress view disables/enables icons based on available packages - set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") - - set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") -endif() - list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) add_executable(${VIEWER_BINARY_NAME} From efc081f0f551a9fd9c2c3115bbe5054d9b079aa3 Mon Sep 17 00:00:00 2001 From: Rye Date: Sat, 11 Oct 2025 09:04:44 -0400 Subject: [PATCH 6/6] Fix crash on startup from missing RLVa setting (#260) --- indra/newview/llagentcamera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 3105021258..2fbea9be1d 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2242,8 +2242,8 @@ LLVector3d LLAgentCamera::getFocusOffsetInitial() // [RLVa:KB] - @setcam_eyeoffsetscale F32 LLAgentCamera::getCameraOffsetScale() const { - static LLCachedControl camera_offset_scale(gSavedSettings, "CameraOffsetScale"); - static LLCachedControl camera_offset_scale_rlv(gSavedSettings, "CameraOffsetScaleRLVa"); + static LLCachedControl camera_offset_scale(gSavedSettings, "CameraOffsetScale", 1.0f); + static LLCachedControl camera_offset_scale_rlv(gSavedSettings, "CameraOffsetScaleRLVa", 0.0f); return (ECameraPreset::CAMERA_RLV_SETCAM_VIEW != mCameraPreset) ? camera_offset_scale : camera_offset_scale_rlv; } // [/RLVa:KB]