summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolalpha.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolalpha.cpp')
-rw-r--r--indra/newview/lldrawpoolalpha.cpp40
1 files changed, 1 insertions, 39 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 01b2647eaa..41e52846b3 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -675,45 +675,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
gPipeline.bindDeferredShader(*target_shader);
}
- if (params.mTexture.notNull())
- {
- gGL.getTexUnit(0)->bindFast(params.mTexture); // diffuse
- }
- else
- {
- gGL.getTexUnit(0)->bindFast(LLViewerFetchedTexture::sWhiteImagep);
- }
-
- if (params.mNormalMap)
- {
- target_shader->bindTexture(LLShaderMgr::BUMP_MAP, params.mNormalMap);
- }
- else
- {
- target_shader->bindTexture(LLShaderMgr::BUMP_MAP, LLViewerFetchedTexture::sFlatNormalImagep);
- }
-
- if (params.mSpecularMap)
- {
- target_shader->bindTexture(LLShaderMgr::SPECULAR_MAP, params.mSpecularMap); // PBR linear packed Occlusion, Roughness, Metal.
- }
- else
- {
- target_shader->bindTexture(LLShaderMgr::SPECULAR_MAP, LLViewerFetchedTexture::sWhiteImagep);
- }
-
- if (params.mEmissiveMap)
- {
- target_shader->bindTexture(LLShaderMgr::EMISSIVE_MAP, params.mEmissiveMap); // PBR sRGB Emissive
- }
- else
- {
- target_shader->bindTexture(LLShaderMgr::EMISSIVE_MAP, LLViewerFetchedTexture::sWhiteImagep);
- }
-
- target_shader->uniform1f(LLShaderMgr::ROUGHNESS_FACTOR, params.mGLTFMaterial->mRoughnessFactor);
- target_shader->uniform1f(LLShaderMgr::METALLIC_FACTOR, params.mGLTFMaterial->mMetallicFactor);
- target_shader->uniform3fv(LLShaderMgr::EMISSIVE_COLOR, 1, params.mGLTFMaterial->mEmissiveColor.mV);
+ params.mGLTFMaterial->bind(target_shader);
}
else
{