Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/renderers/webgl/WebGLTextures.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,

} else if ( texture.isTexture3D ) {

state.texImage3D( _gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.length, 0, glFormat, glType, image.data );
state.texImage3D( _gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data );
textureProperties.__maxMipLevel = 0;

} else {
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/webgl/WebGLUniforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import { CubeTexture } from '../../textures/CubeTexture.js';
import { Texture } from '../../textures/Texture.js';

var emptyTexture = new Texture();
var emptyTexture3d = new Texture();
var emptyTexture3d = new Texture3D();
var emptyCubeTexture = new CubeTexture();

// --- Base for inner nodes (including the root) ---
Expand Down
4 changes: 2 additions & 2 deletions src/textures/Texture3D.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import { Texture } from './Texture.js';
import { NearestFilter } from '../constants.js';

function Texture3D( data, width, height, length, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) {
function Texture3D( data, width, height, depth, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) {

Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );

this.image = { data: data, width: width, height: height, length: length };
this.image = { data: data, width: width, height: height, depth: depth };

this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
this.minFilter = minFilter !== undefined ? minFilter : NearestFilter;
Expand Down