提交 4e015df1 编写于 作者: W WestLangley

Texture rotation: auto-update texture.matrix

上级 d1e46316
......@@ -1984,17 +1984,14 @@ function WebGLRenderer( parameters ) {
if ( uvScaleMap.matrixAutoUpdate === true ) {
var offset = uvScaleMap.offset;
var repeat = uvScaleMap.repeat;
uniforms.uvTransform.value.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, 0, 0, 0 );
} else {
uniforms.uvTransform.value.copy( uvScaleMap.matrix );
var offset = uvScaleMap.offset;
var repeat = uvScaleMap.repeat;
uvScaleMap.matrix.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, 0, 0, 0 );
}
uniforms.uvTransform.value.copy( uvScaleMap.matrix );
}
}
......@@ -2027,17 +2024,14 @@ function WebGLRenderer( parameters ) {
if ( material.map.matrixAutoUpdate === true ) {
var offset = material.map.offset;
var repeat = material.map.repeat;
uniforms.uvTransform.value.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, 0, 0, 0 );
} else {
uniforms.uvTransform.value.copy( material.map.matrix );
var offset = material.map.offset;
var repeat = material.map.repeat;
material.map.matrix.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, 0, 0, 0 );
}
uniforms.uvTransform.value.copy( material.map.matrix );
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册