Pass multiple textures to a shaderMaterial from BoxBufferGeometry

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?

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

2 Likes

Thank you! I think it’s perfect! :ok_hand: