|
@@ -2161,6 +2161,40 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // uv repeat and offset setting priorities for uv2
|
|
|
+ // 1. ao map
|
|
|
+ // 2. light map
|
|
|
+
|
|
|
+ var uv2ScaleMap;
|
|
|
+
|
|
|
+ if ( material.aoMap ) {
|
|
|
+
|
|
|
+ uv2ScaleMap = material.aoMap;
|
|
|
+
|
|
|
+ } else if ( material.lightMap ) {
|
|
|
+
|
|
|
+ uv2ScaleMap = material.lightMap;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( uvScaleMap !== undefined ) {
|
|
|
+
|
|
|
+ // backwards compatibility
|
|
|
+ if ( uv2ScaleMap.isWebGLRenderTarget ) {
|
|
|
+
|
|
|
+ uv2ScaleMap = uv2ScaleMap.texture;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( uv2ScaleMap.matrixAutoUpdate === true ) {
|
|
|
+
|
|
|
+ uv2ScaleMap.updateMatrix();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ uniforms.uv2Transform.value.copy( uv2ScaleMap.matrix );
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function refreshUniformsLine( uniforms, material ) {
|