SH-2600 Fix for busted texture animation on bump mapped objects.

meow-7.2.2
Dave Parks 2011-10-20 14:33:36 -05:00
parent 1762cc4939
commit 4e894bfa31
2 changed files with 3 additions and 5 deletions

View File

@ -24,7 +24,6 @@
*/
uniform mat4 texture_matrix0;
uniform mat4 texture_matrix1;
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
@ -39,5 +38,5 @@ void main()
//transform vertex
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
vary_texcoord1 = (texture_matrix1 * vec4(texcoord1,0,1)).xy;
vary_texcoord1 = (texture_matrix0 * vec4(texcoord1,0,1)).xy;
}

View File

@ -1453,11 +1453,10 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
}
else
{
gGL.getTexUnit(1)->activate();
gGL.getTexUnit(0)->activate();
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
gPipeline.mTextureMatrixOps++;
gGL.getTexUnit(0)->activate();
}
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
@ -1470,7 +1469,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
{
if (params.mTexture.notNull())
{
gGL.getTexUnit(diffuse_channel)->bind(params.mTexture) ;
gGL.getTexUnit(diffuse_channel)->bind(params.mTexture);
params.mTexture->addTextureStats(params.mVSize);
}
else