# Multiple textures with instanced geometry

**URL:** https://discourse.threejs.org/t/multiple-textures-with-instanced-geometry/5637
**Category:** Questions
**Tags:** instancing, textures
**Created:** [January 7, 2019, 1:29pm UTC](https://discourse.threejs.org/t/multiple-textures-with-instanced-geometry/5637 "2019-01-07T13:29:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![KyKyPy3](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kykypy3/32/3446_2.png) [@KyKyPy3](https://discourse.threejs.org/u/KyKyPy3)
#### Post date: [January 7, 2019, 1:29pm UTC](https://discourse.threejs.org/t/multiple-textures-with-instanced-geometry/5637/1 "2019-01-07T13:29:26Z")

</div>

I use instanced buffered geometry to draw a lot of points. But such geometry uses a single material. How can I use different textures for each point? I have an idea to put all the textures on one canvas, but I don’t understand how to draw the desired texture in the shader.

---

<div class="post-metadata">

### Author: ![Oskasb](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/oskasb/32/51_2.png) [@Oskasb](https://discourse.threejs.org/u/Oskasb)
#### Post date: [January 7, 2019, 5:18pm UTC](https://discourse.threejs.org/t/multiple-textures-with-instanced-geometry/5637/2 "2019-01-07T17:18:10Z")

</div>

I use an extra attribute for uv\_offset to do this for various use cases typically particles and vegetation systems.

---

<div class="post-metadata">

### Author: ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)
#### Post date: [January 7, 2019, 7:38pm UTC](https://discourse.threejs.org/t/multiple-textures-with-instanced-geometry/5637/3 "2019-01-07T19:38:46Z")

</div>

Specifically for an instanced buffer geometry, use an instanced buffer attribute to shift UVs.  
Jusn an example:  
https://codepen.io/prisoner849/embed/preview/REyzJV?height=300&slug-hash=REyzJV&default-tabs=js,result&host=https://codepen.io

---

<div class="post-metadata">

### Author: ![KyKyPy3](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kykypy3/32/3446_2.png) [@KyKyPy3](https://discourse.threejs.org/u/KyKyPy3)
#### Post date: [January 8, 2019, 8:24pm UTC](https://discourse.threejs.org/t/multiple-textures-with-instanced-geometry/5637/4 "2019-01-08T20:24:35Z")

</div>

Thx. I found solution.
