Browse Source

ensure internalFormat is copied to texture for WebGLRenderTarget (#22344)

Garrett Johnson 4 years ago
parent
commit
79a0cc80b0
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/renderers/WebGLRenderTarget.js

+ 5 - 0
src/renderers/WebGLRenderTarget.js

@@ -25,6 +25,11 @@ class WebGLRenderTarget extends EventDispatcher {
 
 		this.texture = new Texture( undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );
 		this.texture.isRenderTargetTexture = true;
+		if ( 'internalFormat' in options ) {
+
+			this.texture.internalFormat = options.internalFormat;
+
+		}
 
 		this.texture.image = { width: width, height: height, depth: 1 };