Texturing Issue?

Greetings from a new user!

It seems to me that the texture has a missmatch of one pixel. One pixel of the right side of the texture appears on the left side etc…

Playground example: https://playground.babylonjs.com/#AVH7YY#1

Could You have look?
Thank you very much in advance.

This is due to how textures are wrapped by default. You can change to this:

    tex1.wrapU = BABYLON.Constants.TEXTURE_CLAMP_ADDRESSMODE;
    tex1.wrapV = BABYLON.Constants.TEXTURE_CLAMP_ADDRESSMODE;

I haven’t been able to find definitive documentation on this yet. Some references though:

3 Likes

Yup we are on repeat mode by default but due to precision of the uvs and such we are fetching a bit after resulting in this.

Clamping as @kaliatech propose is definitely the best approach.

@kaliatech
Thank you very much!