浏览代码

WebGLRenderer: Restore POT for transmission render target. (#25494)

Michael Herzog 2 年之前
父节点
当前提交
fa92355fea
共有 1 个文件被更改,包括 1 次插入16 次删除
  1. 1 16
      src/renderers/WebGLRenderer.js

+ 1 - 16
src/renderers/WebGLRenderer.js

@@ -11,10 +11,8 @@ import {
 	NoToneMapping,
 	NoToneMapping,
 	LinearMipmapLinearFilter
 	LinearMipmapLinearFilter
 } from '../constants.js';
 } from '../constants.js';
-import { floorPowerOfTwo } from '../math/MathUtils.js';
 import { Frustum } from '../math/Frustum.js';
 import { Frustum } from '../math/Frustum.js';
 import { Matrix4 } from '../math/Matrix4.js';
 import { Matrix4 } from '../math/Matrix4.js';
-import { Vector2 } from '../math/Vector2.js';
 import { Vector3 } from '../math/Vector3.js';
 import { Vector3 } from '../math/Vector3.js';
 import { Vector4 } from '../math/Vector4.js';
 import { Vector4 } from '../math/Vector4.js';
 import { WebGLAnimation } from './webgl/WebGLAnimation.js';
 import { WebGLAnimation } from './webgl/WebGLAnimation.js';
@@ -183,7 +181,6 @@ function WebGLRenderer( parameters = {} ) {
 
 
 	const _projScreenMatrix = new Matrix4();
 	const _projScreenMatrix = new Matrix4();
 
 
-	const _vector2 = new Vector2();
 	const _vector3 = new Vector3();
 	const _vector3 = new Vector3();
 
 
 	const _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };
 	const _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };
@@ -1237,7 +1234,7 @@ function WebGLRenderer( parameters = {} ) {
 
 
 		if ( _transmissionRenderTarget === null ) {
 		if ( _transmissionRenderTarget === null ) {
 
 
-			_transmissionRenderTarget = new WebGLRenderTarget( 1, 1, {
+			_transmissionRenderTarget = new WebGLRenderTarget( 1024, 1024, {
 				generateMipmaps: true,
 				generateMipmaps: true,
 				type: extensions.has( 'EXT_color_buffer_half_float' ) ? HalfFloatType : UnsignedByteType,
 				type: extensions.has( 'EXT_color_buffer_half_float' ) ? HalfFloatType : UnsignedByteType,
 				minFilter: LinearMipmapLinearFilter,
 				minFilter: LinearMipmapLinearFilter,
@@ -1246,18 +1243,6 @@ function WebGLRenderer( parameters = {} ) {
 
 
 		}
 		}
 
 
-		_this.getDrawingBufferSize( _vector2 );
-
-		if ( isWebGL2 ) {
-
-			_transmissionRenderTarget.setSize( _vector2.x, _vector2.y );
-
-		} else {
-
-			_transmissionRenderTarget.setSize( floorPowerOfTwo( _vector2.x ), floorPowerOfTwo( _vector2.y ) );
-
-		}
-
 		//
 		//
 
 
 		const currentRenderTarget = _this.getRenderTarget();
 		const currentRenderTarget = _this.getRenderTarget();