Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/nodes/accessors/SceneProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const backgroundRotation = /*@__PURE__*/ uniform( new Matrix4() ).setGrou

const background = scene.background;

if ( background !== null && background.isTexture && background.mapping !== UVMapping ) {
if ( ( background !== null && background.isTexture && background.mapping !== UVMapping ) || ( scene.backgroundNode && scene.backgroundNode.isNode ) ) {

// note: since the matrix is orthonormal, we can use the more-efficient transpose() in lieu of invert()
_m1.makeRotationFromEuler( scene.backgroundRotation ).transpose();
Expand Down
4 changes: 4 additions & 0 deletions src/nodes/core/MRTNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ class MRTNode extends OutputStructNode {
for ( const name in outputNodes ) {

const index = getTextureIndex( textures, name );

// Ignore if the output exists in the MRT but has never been used.
if ( index === - 1 ) continue;

const type = builder.getOutputType( index );

members[ index ] = outputNodes[ name ].convert( type );
Expand Down
Loading