Update offset texture in shader (by modifying material)

Hello , have a nice day , i have some performance issue , when i try to move offset of texture into tick function it so bad performance in some computer , so i will try to move it from shader , but how i can just move offset from shader without change the material to shadermaterial??, i try to change color by


but what about offsets?

The codepen runs perfectly fine on my six year old iMac. The code itself also looks good.

Yes but it is minimal demo , when i try to change offset to 18 texture in model it was too slow , so i will try to change offset from shader

I don’t know how threejs work with offset , is it change the offset to each vertex ?

There is a transformation matrix for texture coordinates. It is composed of offset, repeat, rotation and center. The texture coordinates are transformed with this matrix in the vertex shader which should be a fast operation.

I think the performance problem comes from the actual number of textures. 18 is quite a lot especially if they have a high resolution and use mipmapping.

Thank you very much, so what do you thing to optimize that? move it on shader don’t help?