Popov72 преди 4 години
родител
ревизия
e8ee8548da
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/Materials/Textures/texture.ts

+ 2 - 0
src/Materials/Textures/texture.ts

@@ -500,10 +500,12 @@ export class Texture extends BaseTexture {
             Matrix.TranslationToRef(-this.uRotationCenter, -this.vRotationCenter, -this.wRotationCenter, TmpVectors.Matrix[0]);
             Matrix.TranslationToRef(this.uRotationCenter, this.vRotationCenter, this.wRotationCenter, TmpVectors.Matrix[1]);
             Matrix.ScalingToRef(this._cachedUScale, this._cachedVScale, 0, TmpVectors.Matrix[2]);
+            Matrix.TranslationToRef(this._cachedUOffset, this._cachedVOffset, 0, TmpVectors.Matrix[3]);
 
             TmpVectors.Matrix[0].multiplyToRef(this._rowGenerationMatrix!, this._cachedTextureMatrix);
             this._cachedTextureMatrix.multiplyToRef(TmpVectors.Matrix[1], this._cachedTextureMatrix);
             this._cachedTextureMatrix.multiplyToRef(TmpVectors.Matrix[2], this._cachedTextureMatrix);
+            this._cachedTextureMatrix.multiplyToRef(TmpVectors.Matrix[3], this._cachedTextureMatrix);
 
             // copy the translation row to the 3rd row of the matrix so that we don't need to update the shaders (which expects the translation to be on the 3rd row)
             this._cachedTextureMatrix.setRowFromFloats(2, this._cachedTextureMatrix.m[12], this._cachedTextureMatrix.m[13], this._cachedTextureMatrix.m[14], 1);