Skip to content

Commit 0a7429c

Browse files
PassNode: throw when depth is unavailable
1 parent 95e3aef commit 0a7429c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/nodes/display/PassNode.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,12 @@ class PassNode extends TempNode {
580580

581581
if ( texture === undefined ) {
582582

583+
if ( name === 'depth' ) {
584+
585+
throw new Error( 'PassNode: Depth texture is not available for this pass.' );
586+
587+
}
588+
583589
const refTexture = this.renderTarget.texture;
584590

585591
texture = refTexture.clone();

0 commit comments

Comments
 (0)