Skip to content

Commit

Permalink
Updated builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed May 26, 2021
1 parent 00147d9 commit baf6526
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
20 changes: 10 additions & 10 deletions build/three.js
Original file line number Diff line number Diff line change
Expand Up @@ -13508,20 +13508,24 @@
function push(object, geometry, material, groupOrder, z, group) {
const renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group);

if (material.transmission !== undefined && material.transmission > 0.0) {
if (material.transmission > 0.0) {
transmissive.push(renderItem);
} else if (material.transparent === true) {
transparent.push(renderItem);
} else {
(material.transparent === true ? transparent : opaque).push(renderItem);
opaque.push(renderItem);
}
}

function unshift(object, geometry, material, groupOrder, z, group) {
const renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group);

if (material.transmission !== undefined && material.transmission > 0.0) {
if (material.transmission > 0.0) {
transmissive.unshift(renderItem);
} else if (material.transparent === true) {
transparent.unshift(renderItem);
} else {
(material.transparent === true ? transparent : opaque).unshift(renderItem);
opaque.unshift(renderItem);
}
}

Expand Down Expand Up @@ -17440,11 +17444,7 @@
let _clippingEnabled = false;
let _localClippingEnabled = false; // transmission

let _transmissionRenderTarget = null;

const _transmissionSamplerSize = new Vector2(1024, 1024); // Should be configurable?
// camera matrices cache

let _transmissionRenderTarget = null; // camera matrices cache

const _projScreenMatrix = new Matrix4();

Expand Down Expand Up @@ -18191,7 +18191,7 @@

function renderTransmissiveObjects(opaqueObjects, transmissiveObjects, scene, camera) {
if (_transmissionRenderTarget === null) {
_transmissionRenderTarget = new WebGLRenderTarget(_transmissionSamplerSize.x, _transmissionSamplerSize.y, {
_transmissionRenderTarget = new WebGLRenderTarget(1024, 1024, {
generateMipmaps: true,
minFilter: LinearMipmapLinearFilter,
magFilter: NearestFilter,
Expand Down
2 changes: 1 addition & 1 deletion build/three.min.js

Large diffs are not rendered by default.

22 changes: 16 additions & 6 deletions build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -18000,13 +18000,17 @@ function WebGLRenderList( properties ) {

const renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group );

if ( material.transmission !== undefined && material.transmission > 0.0 ) {
if ( material.transmission > 0.0 ) {

transmissive.push( renderItem );

} else if ( material.transparent === true ) {

transparent.push( renderItem );

} else {

( material.transparent === true ? transparent : opaque ).push( renderItem );
opaque.push( renderItem );

}

Expand All @@ -18016,13 +18020,17 @@ function WebGLRenderList( properties ) {

const renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group );

if ( material.transmission !== undefined && material.transmission > 0.0 ) {
if ( material.transmission > 0.0 ) {

transmissive.unshift( renderItem );

} else if ( material.transparent === true ) {

transparent.unshift( renderItem );

} else {

( material.transparent === true ? transparent : opaque ).unshift( renderItem );
opaque.unshift( renderItem );

}

Expand Down Expand Up @@ -23626,7 +23634,6 @@ function WebGLRenderer( parameters ) {
// transmission

let _transmissionRenderTarget = null;
const _transmissionSamplerSize = new Vector2( 1024, 1024 ); // Should be configurable?

// camera matrices cache

Expand Down Expand Up @@ -24727,7 +24734,7 @@ function WebGLRenderer( parameters ) {

if ( _transmissionRenderTarget === null ) {

_transmissionRenderTarget = new WebGLRenderTarget( _transmissionSamplerSize.x, _transmissionSamplerSize.y, {
_transmissionRenderTarget = new WebGLRenderTarget( 1024, 1024, {
generateMipmaps: true,
minFilter: LinearMipmapLinearFilter,
magFilter: NearestFilter,
Expand All @@ -24740,8 +24747,11 @@ function WebGLRenderer( parameters ) {
const currentRenderTarget = _this.getRenderTarget();
_this.setRenderTarget( _transmissionRenderTarget );
_this.clear();

renderObjects( opaqueObjects, scene, camera );

textures.updateRenderTargetMipmap( _transmissionRenderTarget );

_this.setRenderTarget( currentRenderTarget );

renderObjects( transmissiveObjects, scene, camera );
Expand Down

0 comments on commit baf6526

Please sign in to comment.