From c60061b504c7d72e627cdf24ba1c9131c4057286 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Fri, 14 Feb 2025 13:16:35 -0500 Subject: Switch from GL_RGB16F to GL_R11F_G11F_B10F for probes (#3562) * #3561 Switch from GL_RGB16F to GL_R11F_G11F_B10F for reflection probes to help reduce memory bandwidth and VRAM pressure. --- indra/llrender/llcubemaparray.cpp | 2 +- indra/llrender/llimagegl.cpp | 1 + indra/newview/llreflectionmapmanager.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llcubemaparray.cpp b/indra/llrender/llcubemaparray.cpp index 635f079581..d0a97dc2c6 100644 --- a/indra/llrender/llcubemaparray.cpp +++ b/indra/llrender/llcubemaparray.cpp @@ -127,7 +127,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_RGB16F; + U32 format = components == 4 ? GL_RGBA16F : GL_R11F_G11F_B10F; if (!hdr) { format = components == 4 ? GL_RGBA8 : GL_RGB8; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 0bfcb5d9d2..3f8903ca09 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -330,6 +330,7 @@ S32 LLImageGL::dataFormatBits(S32 dataformat) case GL_RGB: return 24; case GL_SRGB: return 24; case GL_RGB8: return 24; + case GL_R11F_G11F_B10F: return 32; case GL_RGBA: return 32; case GL_RGBA8: return 32; case GL_RGB10_A2: return 32; diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 4760ab376e..9a20977652 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -227,7 +227,7 @@ void LLReflectionMapManager::update() if (!mRenderTarget.isComplete()) { - U32 color_fmt = render_hdr ? GL_RGBA16F : GL_RGBA8; + U32 color_fmt = render_hdr ? GL_R11F_G11F_B10F : GL_RGB8; U32 targetRes = mProbeResolution * 4; // super sample mRenderTarget.allocate(targetRes, targetRes, color_fmt, true); } @@ -240,7 +240,7 @@ void LLReflectionMapManager::update() mMipChain.resize(count); for (U32 i = 0; i < count; ++i) { - mMipChain[i].allocate(res, res, render_hdr ? GL_RGB16F : GL_RGB8); + mMipChain[i].allocate(res, res, render_hdr ? GL_R11F_G11F_B10F : GL_RGB8); res /= 2; } } -- cgit v1.2.3