diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-04-30 17:06:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 19:06:27 -0500 |
commit | 9b6979f458b585618fa59887b500a1a7a4a6e02f (patch) | |
tree | a4709cd29f19659bf25a763644c1290c95db1ada /indra/newview/llviewershadermgr.cpp | |
parent | 1514edc58a498fde9533136f86bb20a9e5ef9a37 (diff) |
Fix for SL-20652 shadows on mac breaking alpha blended objects. (#1264)
* Fix for SL-20652 shadows on mac breaking alpha blended objects.
fix secondlife/jira-archive-internal#71030
* clean up surrounding indentation
* Skip unnecessary casting
* Clean up LLGLSLShader::sIndexedTextureChannels usage and improve fix for SL-20652
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 289c0d7567..5144b28ce9 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -423,7 +423,10 @@ void LLViewerShaderMgr::setShaders() static LLCachedControl<U32> max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16); // when using indexed texture rendering, leave some texture units available for shadow and reflection maps - LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits-12, (S32) max_texture_index), 1); + static LLCachedControl<S32> reserved_texture_units(gSavedSettings, "RenderReservedTextureIndices", 14); + + LLGLSLShader::sIndexedTextureChannels = + llclamp<S32>(max_texture_index, 1, gGLManager.mNumTextureImageUnits-reserved_texture_units); reentrance = true; |