|
@@ -115,7 +115,9 @@
|
|
// THREEJS will select R32F (33326) based on the RedFormat and FloatType.
|
|
// THREEJS will select R32F (33326) based on the RedFormat and FloatType.
|
|
// Also see https://www.khronos.org/registry/webgl/specs/latest/2.0/#TEXTURE_TYPES_FORMATS_FROM_DOM_ELEMENTS_TABLE
|
|
// Also see https://www.khronos.org/registry/webgl/specs/latest/2.0/#TEXTURE_TYPES_FORMATS_FROM_DOM_ELEMENTS_TABLE
|
|
// TODO: look the dtype up in the volume metadata
|
|
// TODO: look the dtype up in the volume metadata
|
|
- var texture = new THREE.Texture3D(volume.data, volume.xLength, volume.yLength, volume.zLength, THREE.RedFormat, THREE.FloatType);
|
|
|
|
|
|
+ var texture = new THREE.Texture3D( volume.data, volume.xLength, volume.yLength, volume.zLength );
|
|
|
|
+ texture.format = THREE.RedFormat;
|
|
|
|
+ texture.type = THREE.FloatType;
|
|
texture.minFilter = texture.magFilter = THREE.LinearFilter;
|
|
texture.minFilter = texture.magFilter = THREE.LinearFilter;
|
|
texture.unpackAlignment = 1;
|
|
texture.unpackAlignment = 1;
|
|
texture.needsUpdate = true;
|
|
texture.needsUpdate = true;
|