Fix trying to bind to non-existent texunit sampler during water draw (#2128)

master
Rye Mutt 2024-08-01 15:50:23 -04:00 committed by GitHub
parent 86668633c3
commit 212b1edd2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 5 deletions

View File

@ -241,8 +241,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
F32 screenRes[] = { 1.f / gGLViewport[2], 1.f / gGLViewport[3] };
S32 diffTex = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP);
shader->uniform2fv(LLShaderMgr::DEFERRED_SCREEN_RES, 1, screenRes);
shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor);
@ -316,8 +314,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
water = static_cast<LLVOWater*>(face->getViewerObject());
if (!water) continue;
gGL.getTexUnit(diffTex)->bind(face->getTexture());
if ((bool)edge == (bool)water->getIsEdgePatch())
{
face->renderIndexed();
@ -334,7 +330,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
shader->disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
shader->disableTexture(LLShaderMgr::WATER_SCREENTEX);
shader->disableTexture(LLShaderMgr::BUMP_MAP);
shader->disableTexture(LLShaderMgr::DIFFUSE_MAP);
shader->disableTexture(LLShaderMgr::WATER_REFTEX);
// clean up