Is it possible to tile (repeat) a DynamicTexture?

Hi, I am trying to create a material with repeating texture, I can do that easily using images or even the grid material but I would like to use DynamicTexture.

I know DynamicTexture has no uScale or vScale, in this case, is there any alternative to tile this texture?

This is the background: https://playground.babylonjs.com/#20OAV9#14460
I expected the plane on the right will have a similar pattern (repeating 8 times) as the one in the middle but using DynamicTexture.

Thank you in advance!

1 Like

you can do this by changing the .wrapU and .wrapV properties of the texture.

Here’s an example: https://playground.babylonjs.com/#20OAV9#14466

Here’s the relevant api documentation: Babylon.js docs

1 Like

Thank you! That’s it, problem fixed.

1 Like