diff options
author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2023-04-12 16:40:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 16:40:51 -0700 |
commit | 88d35aaf0f6478c7d426c8d01b230d089a52aaf9 (patch) | |
tree | 2cd307846fafb16c4f53c464a2e55b1d1fd33ca6 /indra/llrender | |
parent | bd7a924a9423105f0acaaaf271d611d435299d14 (diff) | |
parent | 6d5c16971654764de28833fd886f522212d3746d (diff) |
Merge pull request #166 from secondlife/DRTVWR-559-post-refactor
Drtvwr 559 post processing refactor
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index d27528296f..b12de563e4 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1091,7 +1091,6 @@ S32 LLGLSLShader::bindTexture(S32 uniform, LLRenderTarget* texture, bool depth, if (uniform < 0 || uniform >= (S32)mTexture.size()) { - LL_SHADER_UNIFORM_ERRS() << "Uniform out of range: " << uniform << LL_ENDL; return -1; } @@ -1099,9 +1098,13 @@ S32 LLGLSLShader::bindTexture(S32 uniform, LLRenderTarget* texture, bool depth, if (uniform > -1) { - bool has_mips = mode == LLTexUnit::TFO_TRILINEAR || mode == LLTexUnit::TFO_ANISOTROPIC; - gGL.getTexUnit(uniform)->bindManual(texture->getUsage(), texture->getTexture(0), has_mips); - + if (depth) { + gGL.getTexUnit(uniform)->bind(texture, true); + } + else { + bool has_mips = mode == LLTexUnit::TFO_TRILINEAR || mode == LLTexUnit::TFO_ANISOTROPIC; + gGL.getTexUnit(uniform)->bindManual(texture->getUsage(), texture->getTexture(0), has_mips); + } gGL.getTexUnit(uniform)->setTextureFilteringOption(mode); } |