diff options
author | Dave Parks <davep@lindenlab.com> | 2022-10-19 14:41:17 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-10-19 14:41:17 -0500 |
commit | de4c018499ddaebbe466fb5a8938554a2d4a3b19 (patch) | |
tree | c2571311bb27190bc2ef9ff03c071169748ef7a2 /indra/newview/lldrawpoolpbropaque.cpp | |
parent | d0c2c862efe2ce684b48092465cc753b3ab64da9 (diff) |
SL-18105 Hook up render pipe directly to LLTextureEntry::mGLTFMaterial and add LLViewerFetchedTextures to LLFetchedGLTFMaterial. Lower reflection probe resolution to 128x128 per side.
Diffstat (limited to 'indra/newview/lldrawpoolpbropaque.cpp')
-rw-r--r-- | indra/newview/lldrawpoolpbropaque.cpp | 55 |
1 files changed, 4 insertions, 51 deletions
diff --git a/indra/newview/lldrawpoolpbropaque.cpp b/indra/newview/lldrawpoolpbropaque.cpp index 71f648a714..2f710e570b 100644 --- a/indra/newview/lldrawpoolpbropaque.cpp +++ b/indra/newview/lldrawpoolpbropaque.cpp @@ -95,57 +95,10 @@ void LLDrawPoolPBROpaque::renderDeferred(S32 pass) for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i) { LLDrawInfo* pparams = *i; - LLGLTFMaterial *mat = pparams->mGLTFMaterial; - - // glTF 2.0 Specification 3.9.4. Alpha Coverage - // mAlphaCutoff is only valid for LLGLTFMaterial::ALPHA_MODE_MASK - F32 min_alpha = -1.0; - if (mat->mAlphaMode == LLGLTFMaterial::ALPHA_MODE_MASK) - { - min_alpha = mat->mAlphaCutoff; - } - shader->uniform1f(LLShaderMgr::MINIMUM_ALPHA, min_alpha); - - if (pparams->mTexture.notNull()) - { - gGL.getTexUnit(0)->bindFast(pparams->mTexture); // diffuse - } - else - { - gGL.getTexUnit(0)->bindFast(LLViewerFetchedTexture::sWhiteImagep); - } - - if (pparams->mNormalMap) - { - shader->bindTexture(LLShaderMgr::BUMP_MAP, pparams->mNormalMap); - } - else - { - shader->bindTexture(LLShaderMgr::BUMP_MAP, LLViewerFetchedTexture::sFlatNormalImagep); - } - - if (pparams->mSpecularMap) - { - shader->bindTexture(LLShaderMgr::SPECULAR_MAP, pparams->mSpecularMap); // PBR linear packed Occlusion, Roughness, Metal. - } - else - { - shader->bindTexture(LLShaderMgr::SPECULAR_MAP, LLViewerFetchedTexture::sWhiteImagep); - } - - if (pparams->mEmissiveMap) - { - shader->bindTexture(LLShaderMgr::EMISSIVE_MAP, pparams->mEmissiveMap); // PBR sRGB Emissive - } - else - { - shader->bindTexture(LLShaderMgr::EMISSIVE_MAP, LLViewerFetchedTexture::sWhiteImagep); - } - - shader->uniform1f(LLShaderMgr::ROUGHNESS_FACTOR, pparams->mGLTFMaterial->mRoughnessFactor); - shader->uniform1f(LLShaderMgr::METALLIC_FACTOR, pparams->mGLTFMaterial->mMetallicFactor); - shader->uniform3fv(LLShaderMgr::EMISSIVE_COLOR, 1, pparams->mGLTFMaterial->mEmissiveColor.mV); - + auto& mat = pparams->mGLTFMaterial; + + mat->bind(shader); + LLGLDisable cull_face(mat->mDoubleSided ? GL_CULL_FACE : 0); bool tex_setup = false; |