Issue when applying NormalMap on repeated texture

Hi,

I’ve got an issue when applying NormalMap with repeated textures :
[java] res.setTexture(“DiffuseMap”, assetManager.loadTexture(“tex.jpg”));

	res.setTexture("NormalMap", assetManager.loadTexture("norm.jpg"));
	}
	t.setWrap(WrapMode.Repeat);

[/java]

I notice that the texture repeats but the normal map doesn’t, and that some lightning become strange, wich may be a subsequence of the not repeating issue (if the first pixel of the normal map is applied continuously)

here is a picture to understand :

I’m using the defaut Common/MatDefs/Light/Lighting.j3md and I’ve never had to modify any matdef. If it’s in there, please be precise :slight_smile:

Thanks !

Try like this:

[java]
difTex = assetManager.loadTexture(“tex.jpg”);
difTex.setWrap(WrapMode.Repeat);
res.setTexture(“DiffuseMap”,difTex );

norTex = assetManager.loadTexture(“norm.jpg”);
norTex.setWrap(WrapMode.Repeat);
res.setTexture(“NormalMap”, norTex);

[/java]

God… Did I really do that mistake?

Thanks a lot !