Texture3D

Hi,
is there a way to create a 3d texture from an image array such as the jme TextureArray? I want to write a Texture3D alternative to Texture2DArray because of support to older hardware.

I tried this:

List<Image> images = new ArrayList<Image>();

Texture3D tex3D = new Texture3D(new TextureArray(images).getImage());
mat.setTexture(“DiffuseMap”, tex3D);


but the fragment shader uses the first texture only

vec4 diffuseColor = texture3D(m_DiffuseMap, vec3(newTexCoord.x, newTexCoord.y, (0.5+newTexCoord.z)/21.0)); // 21 different textures

i guess you can convert it…look at TestTexture3D, the 3D texture is done by code.