|
@@ -662,8 +662,8 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
let textureType = _gl.TEXTURE_2D;
|
|
|
|
|
|
- if ( texture.isDataTexture2DArray ) textureType = _gl.TEXTURE_2D_ARRAY;
|
|
|
- if ( texture.isDataTexture3D ) textureType = _gl.TEXTURE_3D;
|
|
|
+ if ( texture.isDataArrayTexture ) textureType = _gl.TEXTURE_2D_ARRAY;
|
|
|
+ if ( texture.isData3DTexture ) textureType = _gl.TEXTURE_3D;
|
|
|
|
|
|
const forceUpload = initTexture( textureProperties, texture );
|
|
|
const source = texture.source;
|
|
@@ -883,7 +883,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
}
|
|
|
|
|
|
- } else if ( texture.isDataTexture2DArray ) {
|
|
|
+ } else if ( texture.isDataArrayTexture ) {
|
|
|
|
|
|
if ( useTexStorage ) {
|
|
|
|
|
@@ -901,7 +901,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
}
|
|
|
|
|
|
- } else if ( texture.isDataTexture3D ) {
|
|
|
+ } else if ( texture.isData3DTexture ) {
|
|
|
|
|
|
if ( useTexStorage ) {
|
|
|
|
|
@@ -1492,7 +1492,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
const isCube = ( renderTarget.isWebGLCubeRenderTarget === true );
|
|
|
const isMultipleRenderTargets = ( renderTarget.isWebGLMultipleRenderTargets === true );
|
|
|
- const isRenderTarget3D = texture.isDataTexture3D || texture.isDataTexture2DArray;
|
|
|
const supportsMips = isPowerOfTwo( renderTarget ) || isWebGL2;
|
|
|
|
|
|
// Setup framebuffer
|
|
@@ -1615,18 +1614,15 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
let glTextureType = _gl.TEXTURE_2D;
|
|
|
|
|
|
- if ( isRenderTarget3D ) {
|
|
|
-
|
|
|
- // Render targets containing layers, i.e: Texture 3D and 2d arrays
|
|
|
+ if ( renderTarget.isWebGL3DRenderTarget || renderTarget.isWebGLArrayRenderTarget ) {
|
|
|
|
|
|
if ( isWebGL2 ) {
|
|
|
|
|
|
- const isTexture3D = texture.isDataTexture3D;
|
|
|
- glTextureType = isTexture3D ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY;
|
|
|
+ glTextureType = renderTarget.isWebGL3DRenderTarget ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
- console.warn( 'THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.' );
|
|
|
+ console.error( 'THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.' );
|
|
|
|
|
|
}
|
|
|
|