Skip to content
Snippets Groups Projects
Commit 4e894bfa authored by David Parks's avatar David Parks
Browse files

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

parent 1762cc49
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
*/ */
uniform mat4 texture_matrix0; uniform mat4 texture_matrix0;
uniform mat4 texture_matrix1;
uniform mat4 modelview_projection_matrix; uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position; ATTRIBUTE vec3 position;
...@@ -39,5 +38,5 @@ void main() ...@@ -39,5 +38,5 @@ void main()
//transform vertex //transform vertex
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; 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;
} }
...@@ -1453,11 +1453,10 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ...@@ -1453,11 +1453,10 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
} }
else else
{ {
gGL.getTexUnit(1)->activate(); gGL.getTexUnit(0)->activate();
gGL.matrixMode(LLRender::MM_TEXTURE); gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix); gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
gPipeline.mTextureMatrixOps++; gPipeline.mTextureMatrixOps++;
gGL.getTexUnit(0)->activate();
} }
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix); gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
...@@ -1470,7 +1469,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ...@@ -1470,7 +1469,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
{ {
if (params.mTexture.notNull()) if (params.mTexture.notNull())
{ {
gGL.getTexUnit(diffuse_channel)->bind(params.mTexture) ; gGL.getTexUnit(diffuse_channel)->bind(params.mTexture);
params.mTexture->addTextureStats(params.mVSize); params.mTexture->addTextureStats(params.mVSize);
} }
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment