summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-04-25 17:15:47 -0500
committerDave Parks <davep@lindenlab.com>2013-04-25 17:15:47 -0500
commit8bf4f1591114f135c64bee5cb9cb5e67bbcf8acd (patch)
tree7c646bd332ee06371d6b6b3d36ece992d572e0ec
parent4102d3fb06c42846796cccb39a03d520c90b325c (diff)
NORSPEC-104 Fix for texture animation sometimes not overriding specular and normal map texture coordinates.
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl1
-rw-r--r--indra/newview/llface.cpp19
2 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 064ec51028..90cf085524 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -297,7 +297,6 @@ void main()
vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
vec3 col;
float bloom = 0.0;
- //if (diffuse.a < 0.9)
{
calcAtmospherics(pos.xyz, 1.0);
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 8f8b35c578..6474e1b1de 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1624,11 +1624,18 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
U8 tex_mode = 0;
+ bool tex_anim = false;
+
+ LLVOVolume* vobj = (LLVOVolume*) (LLViewerObject*) mVObjp;
+ tex_mode = vobj->mTexAnimMode;
+
+ if (vobj->mTextureAnimp)
+ { //texture animation is in play, override specular and normal map tex coords with diffuse texcoords
+ tex_anim = true;
+ }
+
if (isState(TEXTURE_ANIM))
{
- LLVOVolume* vobj = (LLVOVolume*) (LLViewerObject*) mVObjp;
- tex_mode = vobj->mTexAnimMode;
-
if (!tex_mode)
{
clearState(TEXTURE_ANIM);
@@ -1643,7 +1650,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
do_xform = false;
}
-
+
if (getVirtualSize() >= MIN_TEX_ANIM_SIZE)
{ //don't override texture transform during tc bake
tex_mode = 0;
@@ -1802,7 +1809,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_TEXCOORD1))
{
mVertexBuffer->getTexCoord1Strider(dst, mGeomIndex, mGeomCount, map_range);
- if (mat)
+ if (mat && !tex_anim)
{
r = mat->getNormalRotation();
mat->getNormalOffset(os, ot);
@@ -1822,7 +1829,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_TEXCOORD2))
{
mVertexBuffer->getTexCoord2Strider(dst, mGeomIndex, mGeomCount, map_range);
- if (mat)
+ if (mat && !tex_anim)
{
r = mat->getSpecularRotation();
mat->getSpecularOffset(os, ot);