Welcome, I have a little struggle with Three.js lately. I'm trying to put some texture maps on terrain and my texture code looks like this:
var textures = {
snow: THREE.ImageUtils.loadTexture( 'img/snow.jpg' ),
snowNorm: THREE.ImageUtils.loadTexture( 'img/snonormal.jpg' ),
}
textures.snow.wrapS = textures.snow.wrapT = THREE.RepeatWrapping;
textures.snowNorm.wrapS = textures.snowNorm.wrapT = THREE.RepeatWrapping;
textures.snow.repeat.set( 100, 100 );
textures.snowNorm.repeat.set( 10, 10 );
snow: new THREE.MeshPhongMaterial({
color: 0xaaaaaa,
specular: 0xffffff,
shininess: 8,
map: textures.snow,
normalMap: textures.snowNorm
}),
My mesh is 100x100 simple grid and I foolishly expected that i'd have an 100 times repeated texture map with 10x reapeated normal map over it, but all i got is 100x repeated texture map with 100x repeated normal map over it.
Is there any way i can achieve having normalMap and map having different repeat values?
Thanks in advance for help.