Volume data format

I’m trying to use Data3DTexture and vertex/fragment shader to render the volume.
I have the volume data that look like this.

const data = [ 123,2, 4, 142, 4, 5, ... ]; // R, G, B, R, G, B ...

What should I use the texture format for this array? or should I include A value right after the B value?
Also, What is the texture type? Is it UnsignedByteType since I’m using UInt8Array?

There are no RGB formats so you have to use RGBA meaning THREE.RGBAFormat. Use 1 as the default alpha value.


1 Like