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

Texture rotation: auto-update texture.matrix

上级 d1e46316
...@@ -1986,10 +1986,9 @@ function WebGLRenderer( parameters ) { ...@@ -1986,10 +1986,9 @@ function WebGLRenderer( parameters ) {
var offset = uvScaleMap.offset; var offset = uvScaleMap.offset;
var repeat = uvScaleMap.repeat; var repeat = uvScaleMap.repeat;
uvScaleMap.matrix.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, 0, 0, 0 );
uniforms.uvTransform.value.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, 0, 0, 0 ); }
} else {
uniforms.uvTransform.value.copy( uvScaleMap.matrix ); uniforms.uvTransform.value.copy( uvScaleMap.matrix );
...@@ -1997,8 +1996,6 @@ function WebGLRenderer( parameters ) { ...@@ -1997,8 +1996,6 @@ function WebGLRenderer( parameters ) {
} }
}
function refreshUniformsLine( uniforms, material ) { function refreshUniformsLine( uniforms, material ) {
uniforms.diffuse.value = material.color; uniforms.diffuse.value = material.color;
...@@ -2029,10 +2026,9 @@ function WebGLRenderer( parameters ) { ...@@ -2029,10 +2026,9 @@ function WebGLRenderer( parameters ) {
var offset = material.map.offset; var offset = material.map.offset;
var repeat = material.map.repeat; var repeat = material.map.repeat;
material.map.matrix.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, 0, 0, 0 );
uniforms.uvTransform.value.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, 0, 0, 0 ); }
} else {
uniforms.uvTransform.value.copy( material.map.matrix ); uniforms.uvTransform.value.copy( material.map.matrix );
...@@ -2040,8 +2036,6 @@ function WebGLRenderer( parameters ) { ...@@ -2040,8 +2036,6 @@ function WebGLRenderer( parameters ) {
} }
}
function refreshUniformsFog( uniforms, fog ) { function refreshUniformsFog( uniforms, fog ) {
uniforms.fogColor.value = fog.color; uniforms.fogColor.value = fog.color;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册