You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
at the moment there is indeed no method to set a texture repeat values.
I had a quick look at this, this is definitely doable (by using texture scale values lower than 1 for example) but we'd need to test for non power of 2 textures when using a WebGL1 context and resize the texture like three.js does it. Seems a bit overkill to me for now.
Anyway you can achieve something similar by using this in your fragment shader:
// whatever repeat values you want, could be passed as a uniformvec2 repeat =vec2(4.0, 4.0);
vec2 textCoords =vec2(mod(vTextureCoord.x * repeat.x, 1.0), mod(vTextureCoord.y * repeat.y, 1.0));
Is it possible to repeat the same texture, on a Plane, across a specified axis?
Something like Three.js does: https://threejs.org/docs/#api/en/textures/Texture.repeat
Or what would be a possible workaround?
The text was updated successfully, but these errors were encountered: