|
@@ -71,14 +71,14 @@ var BABYLON;
|
|
this.getScene().getEngine().updateTextureSamplingMode(samplingMode, this._texture);
|
|
this.getScene().getEngine().updateTextureSamplingMode(samplingMode, this._texture);
|
|
};
|
|
};
|
|
Texture.prototype._prepareRowForTextureGeneration = function (x, y, z, t) {
|
|
Texture.prototype._prepareRowForTextureGeneration = function (x, y, z, t) {
|
|
- x -= this.uOffset + 0.5;
|
|
|
|
- y -= this.vOffset + 0.5;
|
|
|
|
|
|
+ x *= this.uScale;
|
|
|
|
+ y *= this.vScale;
|
|
|
|
+ x -= 0.5 * this.uScale;
|
|
|
|
+ y -= 0.5 * this.vScale;
|
|
z -= 0.5;
|
|
z -= 0.5;
|
|
BABYLON.Vector3.TransformCoordinatesFromFloatsToRef(x, y, z, this._rowGenerationMatrix, t);
|
|
BABYLON.Vector3.TransformCoordinatesFromFloatsToRef(x, y, z, this._rowGenerationMatrix, t);
|
|
- t.x *= this.uScale;
|
|
|
|
- t.y *= this.vScale;
|
|
|
|
- t.x += 0.5;
|
|
|
|
- t.y += 0.5;
|
|
|
|
|
|
+ t.x += 0.5 * this.uScale + this.uOffset;
|
|
|
|
+ t.y += 0.5 * this.vScale + this.vOffset;
|
|
t.z += 0.5;
|
|
t.z += 0.5;
|
|
};
|
|
};
|
|
Texture.prototype.getTextureMatrix = function () {
|
|
Texture.prototype.getTextureMatrix = function () {
|