|
@@ -434,6 +434,12 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_S, utils.convert( texture.wrapS ) );
|
|
|
_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_T, utils.convert( texture.wrapT ) );
|
|
|
|
|
|
+ if ( textureType === _gl.TEXTURE_3D ) {
|
|
|
+
|
|
|
+ _gl.texParameteri( textureType, _gl.TEXTURE_WRAP_R, utils.convert( texture.wrapR ) );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
_gl.texParameteri( textureType, _gl.TEXTURE_MAG_FILTER, utils.convert( texture.magFilter ) );
|
|
|
_gl.texParameteri( textureType, _gl.TEXTURE_MIN_FILTER, utils.convert( texture.minFilter ) );
|
|
|
|
|
@@ -442,6 +448,12 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_S, _gl.CLAMP_TO_EDGE );
|
|
|
_gl.texParameteri( textureType, _gl.TEXTURE_WRAP_T, _gl.CLAMP_TO_EDGE );
|
|
|
|
|
|
+ if ( textureType === _gl.TEXTURE_3D ) {
|
|
|
+
|
|
|
+ _gl.texParameteri( textureType, _gl.TEXTURE_WRAP_R, _gl.CLAMP_TO_EDGE );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) {
|
|
|
|
|
|
console.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.' );
|