|
@@ -28005,6 +28005,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
|
|
|
|
|
|
const _projScreenMatrix = new Matrix4();
|
|
|
|
|
|
+ const _vector2 = new Vector2();
|
|
|
const _vector3 = new Vector3();
|
|
|
|
|
|
const _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };
|
|
@@ -29131,11 +29132,11 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
|
|
|
|
|
|
function renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ) {
|
|
|
|
|
|
- if ( _transmissionRenderTarget === null ) {
|
|
|
+ const isWebGL2 = capabilities.isWebGL2;
|
|
|
|
|
|
- const isWebGL2 = capabilities.isWebGL2;
|
|
|
+ if ( _transmissionRenderTarget === null ) {
|
|
|
|
|
|
- _transmissionRenderTarget = new WebGLRenderTarget( 1024 * _pixelRatio, 1024 * _pixelRatio, {
|
|
|
+ _transmissionRenderTarget = new WebGLRenderTarget( 1, 1, {
|
|
|
generateMipmaps: true,
|
|
|
type: extensions.has( 'EXT_color_buffer_half_float' ) ? HalfFloatType : UnsignedByteType,
|
|
|
minFilter: LinearMipmapLinearFilter,
|
|
@@ -29154,6 +29155,18 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
|
|
|
|
|
|
}
|
|
|
|
|
|
+ _this.getDrawingBufferSize( _vector2 );
|
|
|
+
|
|
|
+ if ( isWebGL2 ) {
|
|
|
+
|
|
|
+ _transmissionRenderTarget.setSize( _vector2.x, _vector2.y );
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ _transmissionRenderTarget.setSize( floorPowerOfTwo( _vector2.x ), floorPowerOfTwo( _vector2.y ) );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
//
|
|
|
|
|
|
const currentRenderTarget = _this.getRenderTarget();
|