I am working on volumetric rendering raw data in three.js. I have a hard time understanding the relationship between the type and format of the texture (in my case it is texture3d) in three.js.
Available type of texture type are :

I tried to put type as THREE.UnsignedIntType for u8int datatype of raw data but it gives invalid internalformat of texture error but everything works fine with type of THREE.UnsignedByteType.
this is my code of texture,
var texture = new THREE.DataTexture3D(data, dims[0], dims[1], dims[2]);
texture.format = THREE.RedFormat;
texture.type = THREE.UnsignedByteType;
Could anyone please say how both are related. I cannot make static since the raw data type can be of any bit (8/16/32) and type(int/float).
