From e50b6b1cfe9f3738909e8857b8f67bb7b282ddd4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 6 Apr 2013 09:45:26 -0700 Subject: [PATCH] Apply texture matrix 0 in the object shader --- files/materials/objects.shader | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/materials/objects.shader b/files/materials/objects.shader index d0e817373..4868cf98d 100644 --- a/files/materials/objects.shader +++ b/files/materials/objects.shader @@ -36,6 +36,8 @@ SH_BEGIN_PROGRAM shUniform(float4x4, wvp) @shAutoConstant(wvp, worldviewproj_matrix) + shUniform(float4x4, textureMatrix0) @shAutoConstant(textureMatrix0, texture_matrix, 0) + #if (VIEWPROJ_FIX) || (SHADOWS) shUniform(float4x4, worldMatrix) @shAutoConstant(worldMatrix, world_matrix) #endif @@ -118,7 +120,7 @@ { shOutputPosition = shMatrixMult(wvp, shInputPosition); - UV.xy = uv0; + UV.xy = shMatrixMult (textureMatrix0, float4(uv0,0,1)).xy; #if SECOND_UV_SET UV.zw = uv1; #endif