Texture distorted

Hello,
I get a strange texture distortion on my gltf model.



Here is my code for the floor texture:
let texRes = 10;
let f_color = tl.load(texture_assets[6]);
f_color.wrapS = THREE.RepeatWrapping;
f_color.wrapT = THREE.RepeatWrapping;
f_color.repeat.set(texRes, texRes);
// same for normal and rougness maps
let floor_mat = new THREE.MeshStandardMaterial({
map: f_color,
side: THREE.DoubleSide,
transparent: false,
normalMap: f_normal,
roughnessMap: f_roughness,
})
loadGLBModel(building_asset).then((model) => {
model.scene.traverse(c => {
if (c.name == “floor”) {
c.material = floor_mat
}
else if (c.name == “window”) {
c.material = window_mat;
}
// …
c.castShadow = true;
c.receiveShadow = true;
})
scene.add(model.scene);
});

Thank you for any suggestions

That looks like shadow acne. There have been quite a few users that bring up the same issue lately:

I wonder if there was an update to the default shadow rendering pipeline that caused this issue to become more common recently? Anyway, try fiddling with the Shadow.bias property. A small value like
light.shadow.bias = -0.005; should do the trick.

1 Like

Thank you very much!