我想在 THREE.js 着色器中重复包装纹理。
原始纹理图像为:

我希望它重复 4x4 次,如下所示:

但是使用以下代码,结果是:

顶点着色器:
varying vec2 vUv;
uniform float textRepeat;
void main()
{    
    // passing texture to fragment shader
    vUv = uv * textRepeat;
    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
片段着色器:
varying vec2 vUv;
uniform sampler2D texture;
void main() {
    // add origianl texture
    gl_FragColor = texture2D(texture, vUv);
}
uniforms在一个 JavaScript 文件中,其中textureRepeat给出了需要重复的时间:
uniforms: {
    texture: {
        type: 't', 
        value: THREE.ImageUtils.loadTexture('image/box.jpg')
    },
    textRepeat: {
        type: 'f',
        value: 8
    }
}
谁能告诉我这里出了什么问题?