# Pass multiple textures to a shaderMaterial from BoxBufferGeometry

**URL:** <https://discourse.threejs.org/t/pass-multiple-textures-to-a-shadermaterial-from-boxbuffergeometry/13297>\
**Category:** Questions\
**Tags:** buffergeometry, shader-material, fragment-shader\
**Created:** [March 4, 2020, 8:22pm UTC](https://discourse.threejs.org/t/pass-multiple-textures-to-a-shadermaterial-from-boxbuffergeometry/13297 "2020-03-04T20:22:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![supah](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/supah/32/8111_2.png) [@supah](https://discourse.threejs.org/u/supah)\
**Post date:** [March 4, 2020, 8:22pm UTC](https://discourse.threejs.org/t/pass-multiple-textures-to-a-shadermaterial-from-boxbuffergeometry/13297/1 "2020-03-04T20:22:39Z")

</div>

Hi!  
I have a simple BoxBufferGeometry with a custom ShaderMaterial.  
For each face of the geometry I wish to render a different texture.

From the vertex shader I’ll twist the vertices of the geometry so I don’t want to subdivide every face in single planes.  
Instead I want to pass to the fragment shader some textures that knows in which face of the box render themselves.

Maybe it’s not the right way. Any advice or example?

---

<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:** [March 4, 2020, 8:35pm UTC](https://discourse.threejs.org/t/pass-multiple-textures-to-a-shadermaterial-from-boxbuffergeometry/13297/2 "2020-03-04T20:35:34Z")

</div>

Hi!  
Take a look at this SO answer for some ideas:

> <https://stackoverflow.com/questions/60154858/rotate-a-texture-map-on-only-one-face-of-a-cube/60158820#60158820>

---

<div class="post-metadata">

**Author:** ![supah](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/supah/32/8111_2.png) [@supah](https://discourse.threejs.org/u/supah)\
**Post date:** [March 4, 2020, 9:08pm UTC](https://discourse.threejs.org/t/pass-multiple-textures-to-a-shadermaterial-from-boxbuffergeometry/13297/3 "2020-03-04T21:08:42Z")

</div>

Thank you! I think it’s perfect! 👌
