|
@@ -2440,8 +2440,8 @@ class WebGLRenderer {
|
|
|
|
|
|
}
|
|
|
|
|
|
- const width = sourceBox.max.x - sourceBox.min.x + 1;
|
|
|
- const height = sourceBox.max.y - sourceBox.min.y + 1;
|
|
|
+ const width = Math.round( sourceBox.max.x - sourceBox.min.x );
|
|
|
+ const height = Math.round( sourceBox.max.y - sourceBox.min.y );
|
|
|
const depth = sourceBox.max.z - sourceBox.min.z + 1;
|
|
|
const glFormat = utils.convert( dstTexture.format );
|
|
|
const glType = utils.convert( dstTexture.type );
|
|
@@ -2488,9 +2488,8 @@ class WebGLRenderer {
|
|
|
|
|
|
} else {
|
|
|
|
|
|
- if ( srcTexture.isCompressedArrayTexture ) {
|
|
|
+ if ( dstTexture.isCompressedArrayTexture ) {
|
|
|
|
|
|
- console.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.' );
|
|
|
_gl.compressedTexSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data );
|
|
|
|
|
|
} else {
|