summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-09-04 22:23:51 +0800
committerErik Kundiman <erik@megapahit.org>2026-09-04 22:23:51 +0800
commitfd3946939064e4cec99cfcf250b1e58a94b3222b (patch)
tree0017de702c43f5c841387bda509b443e61572437
parent00bb3bb6f07660bd914d29a1389342bb3060d254 (diff)
parent780c07f438b67768359ab5300cdb1f6f3fb2ba4d (diff)
Merge branch 'main' into 26.4
-rw-r--r--README.md12
-rw-r--r--indra/cmake/Boost.cmake4
-rw-r--r--indra/cmake/Discord.cmake2
-rw-r--r--indra/cmake/NDOF.cmake38
-rw-r--r--indra/newview/CMakeLists.txt3
-rw-r--r--indra/newview/ViewerInstall.cmake2
-rw-r--r--indra/newview/llviewerwindow.cpp8
-rw-r--r--indra/newview/llvoavatar.cpp2
-rw-r--r--indra/newview/pipeline.cpp83
-rw-r--r--indra/newview/pipeline.h7
-rw-r--r--indra/newview/skins/default/xui/en/panel_snapshot_local.xml54
11 files changed, 96 insertions, 119 deletions
diff --git a/README.md b/README.md
index c3a38de49c..b80241b2dd 100644
--- a/README.md
+++ b/README.md
@@ -146,12 +146,12 @@ $ megapahit
### Windows arm64
```
-$ vcpkg install python3 freealut apr-util boost curl freetype hunspell libjpeg-turbo meshoptimizer minizip nanosvg nghttp2 openjpeg sse2neon libvorbis libxml2[tools] xxhash
+$ vcpkg install freealut apr-util boost curl freetype hunspell libjpeg-turbo meshoptimizer minizip nanosvg nghttp2 openjpeg sse2neon libvorbis libxml2[tools] xxhash
$ vcpkg install --allow-unsupported boost-fiber
$ export LL_BUILD_RELEASE="/MD /O2 /Ob2 /std:c++20 /permissive- /Zc:wchar_t /Zi /GR /Zc:preprocessor /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602 /DLL_OS_DRAGDROP_ENABLED=1"
$ export LL_BUILD_RELWITHDEBINFO="/MD /Od /Ob0 /std:c++20 /permissive- /Zc:wchar_t /Zi /GR /Zc:preprocessor /DEBUG /DLL_RELEASE=1 /DLL_RELEASE_WITH_DEBUG_INFO=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602 /DLL_OS_DRAGDROP_ENABLED=1"
-$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-4.4.0-windows/cmake-4.4.0-windows-arm64/bin:$VCPKG_ROOT/installed/arm64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/18/BuildTools/MSBuild/Current/Bin:$PATH"
-$ export PYTHON="$VCPKG_ROOT/installed/arm64-windows/tools/python3"
+$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-4.4.2-windows/cmake-4.4.2-windows-arm64/bin:$VCPKG_ROOT/installed/arm64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/18/BuildTools/MSBuild/Current/Bin:$PATH"
+$ export PYTHON="$VCPKG_ROOT/downloads/tools/python/python-3.14.2-arm64-1"
$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=Megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra
$ MSBuild.exe Megapahit.slnx -p:Configuration=Release
$ cpack -G NSIS
@@ -160,11 +160,11 @@ $ start Megapahit-`cat newview/viewer_version.txt`-win64.exe
### Windows x64
```
-$ vcpkg install python3 freealut apr-util boost freetype glm hunspell libjpeg-turbo meshoptimizer minizip nanosvg nghttp2 openjpeg libvorbis libxml2[tools] xxhash
+$ vcpkg install freealut apr-util boost freetype glm hunspell libjpeg-turbo meshoptimizer minizip nanosvg nghttp2 openjpeg libvorbis libxml2[tools] xxhash
$ export LL_BUILD_RELEASE="/MD /O2 /Ob2 /std:c++20 /permissive- /Zc:wchar_t /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602 /DLL_OS_DRAGDROP_ENABLED=1 /DLIB_NDOF=1"
$ export LL_BUILD_RELWITHDEBINFO="/MD /Od /Ob0 /std:c++20 /permissive- /Zc:wchar_t /Zi /GR /DEBUG /DLL_RELEASE=1 /DLL_RELEASE_WITH_DEBUG_INFO=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602 /DLL_OS_DRAGDROP_ENABLED=1 /DLIB_NDOF=1"
-$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-4.4.0-windows/cmake-4.4.0-windows-x86_64/bin:$VCPKG_ROOT/installed/x64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/18/BuildTools/MSBuild/Current/Bin:$PATH"
-$ export PYTHON="$VCPKG_ROOT/installed/x64-windows/tools/python3"
+$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-4.4.2-windows/cmake-4.4.2-windows-x86_64/bin:$VCPKG_ROOT/installed/x64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/18/BuildTools/MSBuild/Current/Bin:$PATH"
+$ export PYTHON="$VCPKG_ROOT/downloads/tools/python/python-3.14.2-x64-1"
$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=Megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra
$ MSBuild.exe Megapahit.slnx -p:Configuration=Release
$ cpack -G NSIS
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index 46600ef029..af3e23a003 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -22,9 +22,9 @@ elseif (WINDOWS)
string(REPLACE "boost_context" "" sfx "${_boost_context_name}")
else ()
if ($ENV{MSYSTEM_CARCH} MATCHES aarch64)
- set(sfx -vc143-mt-a64-1_91)
+ set(sfx -vc145-mt-a64-1_92)
else ()
- set(sfx -vc143-mt-x64-1_91)
+ set(sfx -vc145-mt-x64-1_92)
endif ()
message(WARNING "Could not detect Boost suffix via glob; using fallback '${sfx}'. "
"Check that vcpkg installed boost into ${prefix_result}.")
diff --git a/indra/cmake/Discord.cmake b/indra/cmake/Discord.cmake
index 13dc4b6cbc..7d952d4864 100644
--- a/indra/cmake/Discord.cmake
+++ b/indra/cmake/Discord.cmake
@@ -11,7 +11,7 @@ if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKIN
set(PREFIX_PATH $ENV{HOME}/Downloads)
endif ()
file(ARCHIVE_EXTRACT
- INPUT ${PREFIX_PATH}/DiscordSocialSdk-1.10.18687.zip
+ INPUT ${PREFIX_PATH}/DiscordSocialSdk-1.10.19337.zip
DESTINATION ${CMAKE_BINARY_DIR}
)
file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/discord_sdk)
diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake
index 7be23db4d4..c430da8ef8 100644
--- a/indra/cmake/NDOF.cmake
+++ b/indra/cmake/NDOF.cmake
@@ -7,42 +7,8 @@ include_guard()
add_library( ll::ndof INTERFACE IMPORTED )
if (NDOF)
- if (WINDOWS)
+ if (WINDOWS OR DARWIN)
use_prebuilt_binary(libndofdev)
- elseif (DARWIN)
- if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/libndofdev_installed OR NOT ${libndofdev_installed} EQUAL 0)
- file(DOWNLOAD
- https://github.com/secondlife/3p-libndofdev/archive/refs/tags/v0.1.8e9edc7.tar.gz
- ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7.tar.gz
- )
- file(ARCHIVE_EXTRACT
- INPUT ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7.tar.gz
- DESTINATION ${CMAKE_BINARY_DIR}
- )
- try_compile(LIBNDOFDEV_RESULT
- PROJECT libndofdev
- SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev
- BINARY_DIR ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev
- TARGET ndofdev
- CMAKE_FLAGS
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
- -DCMAKE_C_FLAGS:STRING=-DTARGET_OS_MAC\ -Wno-int-conversion
- OUTPUT_VARIABLE libndofdev_installed
- )
- if (${LIBNDOFDEV_RESULT})
- file(
- COPY ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev/src/ndofdev_external.h
- DESTINATION ${LIBS_PREBUILT_DIR}/include
- )
- file(
- COPY ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev/src/libndofdev.dylib
- DESTINATION ${ARCH_PREBUILT_DIRS_RELEASE}
- )
- file(WRITE ${PREBUILD_TRACKING_DIR}/libndofdev_installed "${libndofdev_installed}")
- endif ()
- endif ()
elseif (LINUX)
if (CMAKE_SYSTEM_PROCESSOR MATCHES x86_64)
use_prebuilt_binary(open-libndofdev)
@@ -76,7 +42,7 @@ if (NDOF)
file(WRITE ${PREBUILD_TRACKING_DIR}/libndofdev_installed "${libndofdev_installed}")
endif ()
endif ()
- endif ()
+ endif (WINDOWS OR DARWIN)
find_library(NDOF_LIBRARY
NAMES
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 779c85c435..ee77a4deaf 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1851,8 +1851,7 @@ set(PACKAGE ON CACHE BOOL
if (PACKAGE)
set(CPACK_PACKAGE_NAME ${VIEWER_BINARY_NAME}
CACHE STRING "Viewer binary name.")
- set(CPACK_PACKAGE_VERSION ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION}
- CACHE STRING "Viewer major.minor.patch.revision versions.")
+ set(CPACK_PACKAGE_VERSION ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION})
set(VIEWER_PACKAGE_COMMENT "A fork of the Second Life viewer")
set(VIEWER_PACKAGE_DESCRIPTION "An entrance to virtual empires in only megabytes. A shelter for the metaverse refugees, especially those from less supported operating systems.")
string(TOLOWER ${VIEWER_BINARY_NAME} DOMAIN_NAME)
diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake
index ee71ecfd46..b05d70bfc0 100644
--- a/indra/newview/ViewerInstall.cmake
+++ b/indra/newview/ViewerInstall.cmake
@@ -161,7 +161,7 @@ elseif (WINDOWS)
get_filename_component(_boost_context_dll_name "${_boost_context_dll}" NAME_WE)
string(REPLACE "boost_context" "" BOOST_DLL_SFX "${_boost_context_dll_name}")
else ()
- set(BOOST_DLL_SFX -vc143-mt-${BOOST_PLATFORM}-1_91)
+ set(BOOST_DLL_SFX -vc145-mt-${BOOST_PLATFORM}-1_92)
message(WARNING "Could not detect Boost DLL suffix via glob; using fallback '${BOOST_DLL_SFX}'.")
endif ()
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 6729e20420..80b395e773 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -5175,6 +5175,7 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
// if not showing ui, use full window to render world view
updateWorldViewRect(!show_ui);
+ gResizeScreenTexture = false;
// Copy screen to a buffer
// crop sides or top and bottom, if taking a snapshot of different aspect ratio
@@ -5206,8 +5207,7 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
F32 scale_factor = 1.0f ;
if (!keep_window_aspect || (image_width > window_width) || (image_height > window_height))
{
- if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) &&
- (image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
+ if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) && LLPipeline::sRenderDeferred && !show_ui)
{
U32 color_fmt = type == LLSnapshotModel::SNAPSHOT_TYPE_DEPTH ? GL_DEPTH_COMPONENT : GL_RGBA;
if (scratch_space.allocate(image_width, image_height, color_fmt, true))
@@ -5215,7 +5215,7 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
original_width = gPipeline.mRT->deferredScreen.getWidth();
original_height = gPipeline.mRT->deferredScreen.getHeight();
- if (gPipeline.allocateScreenBuffer(image_width, image_height))
+ if (gPipeline.allocateScreenBuffer(image_width, image_height, 1))
{
window_width = image_width;
window_height = image_height;
@@ -5488,7 +5488,7 @@ bool LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
U32 color_fmt = GL_RGBA;
if (scratch_space.allocate(image_width, image_height, color_fmt, true))
{
- if (gPipeline.allocateScreenBuffer(image_width, image_height))
+ if (gPipeline.allocateScreenBuffer(image_width, image_height, 1))
{
mWorldViewRectRaw.set(0, image_height, image_width, 0);
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f4226df5f7..22eb5d8b80 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -6541,7 +6541,7 @@ bool LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
{
auto name = (*iter)->getName();
auto colon = name.find_first_of(':');
- if (name == action || colon != std::string::npos && !name.compare(0, colon, action))
+ if (name == action || (colon != std::string::npos && !name.compare(0, colon, action)))
{
folderID = findDescendentCategoryIDByName(folderID, name);
gInventory.getDirectDescendentsOf(folderID, cats, items);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bc1a105e44..bccff55a2c 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -240,7 +240,7 @@ const F32 ALPHA_BLEND_CUTOFF = 0.598f;
const F32 DEFERRED_LIGHT_FALLOFF = 0.5f;
const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1;
-const U32 SHADOWS_RESX = 512;
+const U32 SHADOWS_RESX = 768;
const U32 SHADOWS_RESY = 512;
extern S32 gBoxFrame;
@@ -788,16 +788,16 @@ void LLPipeline::resizeScreenTexture()
releaseScreenBuffers();
releaseSunShadowTargets();
releaseSpotShadowTargets();
- allocateScreenBuffer(resX,resY);
+ allocateScreenBuffer(resX, resY);
gResizeScreenTexture = false;
}
}
}
-bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
+bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 snapshot_)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
- eFBOStatus ret = doAllocateScreenBuffer(resX, resY);
+ eFBOStatus ret = doAllocateScreenBuffer(resX, resY, snapshot_);
return ret == FBO_SUCCESS_FULLRES;
}
@@ -809,7 +809,7 @@ void LLPipeline::renderTriangle()
}
-LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
+LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY, U32 snapshot_)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
// try to allocate screen buffers at requested resolution and samples
@@ -820,8 +820,11 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
// refresh cached settings here to protect against inconsistent event handling order
refreshCachedSettings();
+ mHDRBuffers = false;
+ if(mHDRDisplay && !snapshot_) mHDRBuffers = true;
+
eFBOStatus ret = FBO_SUCCESS_FULLRES;
- if (!allocateScreenBufferInternal(resX, resY))
+ if (!allocateScreenBufferInternal(resX, resY, snapshot_))
{
//failed to allocate at requested specification, return false
ret = FBO_FAILURE;
@@ -832,14 +835,14 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
while (resY > 0 && resX > 0)
{
resY /= 2;
- if (allocateScreenBufferInternal(resX, resY))
+ if (allocateScreenBufferInternal(resX, resY, snapshot_))
{
return FBO_SUCCESS_LOWRES;
}
releaseScreenBuffers();
resX /= 2;
- if (allocateScreenBufferInternal(resX, resY))
+ if (allocateScreenBufferInternal(resX, resY, snapshot_))
{
return FBO_SUCCESS_LOWRES;
}
@@ -852,7 +855,7 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
return ret;
}
-bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY, U32 type_)
+bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY, U32 snapshot_)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
bool has_hdr = gSavedSettings.getBOOL("RenderHDREnabled");
@@ -872,14 +875,14 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY, U32 type_)
mRT = &mAuxillaryRT;
U32 res = mReflectionMapManager.mProbeResolution * 4; //multiply by 4 because probes will be 16x super sampled
- allocateScreenBufferInternal(res, res, 1);
+ allocateScreenBufferInternal(res, res, snapshot_);
if (RenderMirrors)
{
mHeroProbeManager.initReflectionMaps();
res = mHeroProbeManager.mProbeResolution; // We also scale the hero probe RT to the probe res since we don't super sample it.
mRT = &mHeroProbeRT;
- allocateScreenBufferInternal(res, res, 2);
+ allocateScreenBufferInternal(res, res, snapshot_);
}
mRT = &mMainRT;
@@ -890,12 +893,15 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY, U32 type_)
mRT->width = resX;
mRT->height = resY;
- F32 res_mod = fmin(RenderResolutionDivisor, 4.0);
-
- if (res_mod >= 0.5 && res_mod <= 4.0)
+ if(!snapshot_)
{
- resX = (U32)(floor((F32)resX / res_mod));
- resY = (U32)(floor((F32)resY / res_mod));
+ F32 res_mod = fmin(RenderResolutionDivisor, 4.0);
+
+ if (res_mod >= 0.5 && res_mod <= 4.0)
+ {
+ resX = (U32)(floor((F32)resX / res_mod));
+ resY = (U32)(floor((F32)resY / res_mod));
+ }
}
S32 shadow_detail = RenderShadowDetail;
@@ -910,9 +916,10 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY, U32 type_)
if (!addDeferredAttachments(mRT->deferredScreen)) return false;
GLuint screenFormat = GL_RGBA16F;
- if(!hdr && !mHDRDisplay && MPColorPrecision == 1) screenFormat = GL_RGB10_A2;
+ if(!hdr || ( !mHDRBuffers && MPColorPrecision == 1 )) screenFormat = GL_RGB10_A2;
- if (!mRT->screen.allocate(resX, resY, GL_RGBA16F)) return false;
+ //if (!mRT->screen.allocate(resX, resY, GL_RGBA16F)) return false;
+ if (!mRT->screen.allocate(resX, resY, screenFormat)) return false;
mRT->deferredScreen.shareDepthBuffer(mRT->screen);
@@ -926,7 +933,7 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY, U32 type_)
}
//allocateShadowBuffer(resX, resY);
- if(type_ == 0) allocateShadowBuffer(SHADOWS_RESX, SHADOWS_RESY);
+ allocateShadowBuffer(SHADOWS_RESX, SHADOWS_RESY);
if (!gCubeSnapshot) // hack to not re-allocate various targets for cube snapshots
{
@@ -5951,21 +5958,21 @@ void LLPipeline::setupHWLights()
mSunDiffuse.setVec(psky->getSunlightColor());
mMoonDiffuse.setVec(psky->getMoonlightColor());
- if(!mHDRDisplay)
- {
- F32 max_color = llmax(mSunDiffuse.mV[0], mSunDiffuse.mV[1], mSunDiffuse.mV[2]);
- if (max_color > 1.f)
+ if(!mHDRBuffers)
{
- mSunDiffuse *= 1.f/max_color;
- }
- mSunDiffuse.clamp();
+ F32 max_color = llmax(mSunDiffuse.mV[0], mSunDiffuse.mV[1], mSunDiffuse.mV[2]);
+ if (max_color > 1.f)
+ {
+ mSunDiffuse *= 1.f/max_color;
+ }
+ mSunDiffuse.clamp();
- max_color = llmax(mMoonDiffuse.mV[0], mMoonDiffuse.mV[1], mMoonDiffuse.mV[2]);
- if (max_color > 1.f)
- {
- mMoonDiffuse *= 1.f/max_color;
- }
- mMoonDiffuse.clamp();
+ max_color = llmax(mMoonDiffuse.mV[0], mMoonDiffuse.mV[1], mMoonDiffuse.mV[2]);
+ if (max_color > 1.f)
+ {
+ mMoonDiffuse *= 1.f/max_color;
+ }
+ mMoonDiffuse.clamp();
}
// prevent underlighting from having neither lightsource facing us
@@ -7513,14 +7520,14 @@ void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst)
gDeferredPostGammaCorrectProgram;
static LLCachedControl<F32> mp_hdr_gamma(gSavedSettings, "MPHDRGamma", false);
- if(mHDRDisplay) shader = gHDRGammaCorrectProgram;
+ if(mHDRBuffers) shader = gHDRGammaCorrectProgram;
shader.bind();
shader.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, false, LLTexUnit::TFO_POINT);
//screensize isn't a uniform in the shader, we comment out for now
//shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)src->getWidth(), (GLfloat)src->getHeight());
- if(mHDRDisplay)
+ if(mHDRBuffers)
{
shader.uniform1f(LLShaderMgr::GAMMA, (GLfloat)mp_hdr_gamma);
shader.uniform1f(LLShaderMgr::MP_HDR_BOOST, 1.0);
@@ -8276,7 +8283,7 @@ bool LLPipeline::renderBloom(LLRenderTarget* src, LLRenderTarget* dst)
static LLCachedControl<F32> mp_bloom_nonmetal(gSavedSettings, "MPBloomExtractNonMetal", 0.2);
F32 clampValue = 1.0;
- if(mHDRDisplay) clampValue = 11.0;
+ if(mHDRBuffers) clampValue = 11.0;
LLGLDepthTest depth(GL_FALSE, GL_FALSE);
LLGLDisable blend(GL_BLEND);
@@ -8404,11 +8411,11 @@ void LLPipeline::renderFinalize()
bool apply_cas = false;
static LLCachedControl<F32> cas_sharpness(gSavedSettings, "RenderCASSharpness", 0.0f);
- if (cas_sharpness > 0.0f && gCASProgram.isComplete() && gCASLegacyGammaProgram.isComplete() && !mHDRDisplay) apply_cas = true;
+ if (cas_sharpness > 0.0f && gCASProgram.isComplete() && gCASLegacyGammaProgram.isComplete() && !mHDRBuffers) apply_cas = true;
U16 activeRT = 0;
- if (hdr && !mHDRDisplay)
+ if (hdr && !mHDRBuffers)
{
copyScreenSpaceReflections(&mRT->screen, &mSceneMap);
@@ -8427,7 +8434,7 @@ void LLPipeline::renderFinalize()
}
else
{
- if(mHDRDisplay) copyScreenSpaceReflections(&mRT->screen, &mSceneMap);
+ if(mHDRBuffers) copyScreenSpaceReflections(&mRT->screen, &mSceneMap);
gammaCorrect(&mRT->screen, &mPostMaps[activeRT]);
}
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 60804eee9e..76a02dde6c 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -114,7 +114,7 @@ public:
//allocate the largest screen buffer possible up to resX, resY
//returns true if full size buffer allocated, false if some other size is allocated
- bool allocateScreenBuffer(U32 resX, U32 resY);
+ bool allocateScreenBuffer(U32 resX, U32 resY, U32 snapshot_ = 0);
typedef enum {
FBO_SUCCESS_FULLRES = 0,
@@ -124,7 +124,7 @@ public:
private:
//implementation of above, wrapped for easy error handling
- eFBOStatus doAllocateScreenBuffer(U32 resX, U32 resY);
+ eFBOStatus doAllocateScreenBuffer(U32 resX, U32 resY, U32 snapshot_ = 0);
void renderTriangle();
public:
@@ -132,7 +132,7 @@ public:
//attempt to allocate screen buffers at resX, resY
//returns true if allocation successful, false otherwise
//type 0 = screen, 1 = probe, 2 = mirror
- bool allocateScreenBufferInternal(U32 resX, U32 resY, U32 type_ = 0);
+ bool allocateScreenBufferInternal(U32 resX, U32 resY, U32 snapshot_ = 0);
bool allocateShadowBuffer(U32 resX, U32 resY);
// rebuild all LLVOVolume render batches
@@ -830,6 +830,7 @@ public:
U32 mTransformFeedbackPrimitives; //number of primitives expected to be generated by transform feedback
bool mHDRDisplay;
+ bool mHDRBuffers;
protected:
bool mRenderTypeEnabled[NUM_RENDER_TYPES];
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
index 34713673d7..8a02315d41 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
@@ -28,9 +28,9 @@
top_delta="2">
Disk
</text>
- <view_border
+ <view_border
bevel_style="in"
- follows="left|top|right"
+ follows="left|top|right"
height="1"
left="9"
layout="topleft"
@@ -51,31 +51,35 @@
name="CurrentWindow"
value="[i0,i0]" />
<combo_box.item
- label="320x240"
- name="320x240"
- value="[i320,i240]" />
- <combo_box.item
- label="640x480"
- name="640x480"
- value="[i640,i480]" />
- <combo_box.item
- label="800x600"
- name="800x600"
- value="[i800,i600]" />
+ label="screen 720p"
+ name="1280x720"
+ value="[i1280,i720]" />
<combo_box.item
- label="1024x768"
- name="1024x768"
- value="[i1024,i768]" />
- <combo_box.item
- label="1280x1024"
- name="1280x1024"
- value="[i1280,i1024]" />
- <combo_box.item
- label="1600x1200"
- name="1600x1200"
- value="[i1600,i1200]" />
+ label="screen 1080p"
+ name="1920x1080"
+ value="[i1920,i1080]" />
+ <combo_box.item
+ label="landscape 1024p"
+ name="1536x1024"
+ value="[i1536,i1024]" />
+ <combo_box.item
+ label="portrait 1024p"
+ name="1024x1536"
+ value="[i1024,i1536]" />
+ <combo_box.item
+ label="MPx2 1400x1050"
+ name="1400x1050"
+ value="[i1400,i1050]" />
+ <combo_box.item
+ label="MPx4 2800x2100"
+ name="2800x2100"
+ value="[i2800,i2100]" />
+ <combo_box.item
+ label="square 1024p"
+ name="1024x1024"
+ value="[i1024,i1024]" />
<combo_box.item
- label="2048x2048"
+ label="square 2048p"
name="2048x2048"
value="[i2048,i2048]" />
<combo_box.item