SL-10763
Fix broken logic for alpha drawpool when rendering with basic shaders off. Force unbind of 2nd tex unit that we use during water rendering.meow-7.2.2
parent
721df1f942
commit
2d514e4b10
|
|
@ -388,7 +388,7 @@ bool LLDrawPoolAlpha::TexSetup(LLDrawInfo* draw, bool use_shaders, bool use_mate
|
|||
|
||||
bool tex_setup = false;
|
||||
|
||||
if (use_shaders && use_material && current_shader)
|
||||
if (deferred_render && use_material && current_shader)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_DEFERRED_TEX_BINDS);
|
||||
if (draw->mNormalMap)
|
||||
|
|
@ -766,7 +766,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||
F32 brightness = 1.0f;
|
||||
|
||||
// We have a material. Supply the appropriate data here.
|
||||
if (use_shaders && mat && LLPipeline::sRenderDeferred)
|
||||
if (use_shaders && mat && deferred_render)
|
||||
{
|
||||
spec_color = params.mSpecColor;
|
||||
env_intensity = params.mEnvIntensity;
|
||||
|
|
@ -785,7 +785,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||
params.mGroup->rebuildMesh();
|
||||
}
|
||||
|
||||
bool tex_setup = TexSetup(¶ms, use_shaders, mat != nullptr, current_shader);
|
||||
bool tex_setup = TexSetup(¶ms, use_shaders, use_shaders && (mat != nullptr), current_shader);
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_PUSH);
|
||||
|
|
@ -802,7 +802,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||
}
|
||||
}
|
||||
|
||||
// If this alpha mesh has glow, then draw it a second time to add the destination-alpha (=glow). Interleaving these state-changing calls could be expensive, but glow must be drawn Z-sorted with alpha.
|
||||
// If this alpha mesh has glow, then draw it a second time to add the destination-alpha (=glow). Interleaving these state-changing calls is expensive, but glow must be drawn Z-sorted with alpha.
|
||||
if (current_shader &&
|
||||
draw_glow_for_this_partition &&
|
||||
params.mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_EMISSIVE))
|
||||
|
|
|
|||
|
|
@ -271,9 +271,9 @@ void LLDrawPoolWater::render(S32 pass)
|
|||
glDisable(GL_TEXTURE_GEN_S); //texture unit 1
|
||||
glDisable(GL_TEXTURE_GEN_T); //texture unit 1
|
||||
|
||||
gGL.getTexUnit(1)->activate();
|
||||
gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gGL.getTexUnit(1)->disable();
|
||||
gGL.getTexUnit(2)->activate();
|
||||
gGL.getTexUnit(2)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gGL.getTexUnit(2)->disable();
|
||||
|
||||
glDisable(GL_TEXTURE_GEN_S); //texture unit 1
|
||||
glDisable(GL_TEXTURE_GEN_T); //texture unit 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue