Skip to content

Commit

Permalink
PostProcessing: Added renderAsync()
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag committed Mar 6, 2024
1 parent 8574b43 commit b455ce8
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions examples/jsm/renderers/common/PostProcessing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { vec4, MeshBasicNodeMaterial } from '../../nodes/Nodes.js';
import { vec4, NodeMaterial } from '../../nodes/Nodes.js';
import QuadMesh from '../../objects/QuadMesh.js';

const quadMesh = new QuadMesh( new MeshBasicNodeMaterial() );
const quadMesh = new QuadMesh( new NodeMaterial() );

class PostProcessing {

Expand All @@ -12,11 +12,19 @@ class PostProcessing {

}

async render() {
render() {

quadMesh.material.fragmentNode = this.outputNode;

await quadMesh.render( this.renderer );
quadMesh.render( this.renderer );

}

renderAsync() {

quadMesh.material.fragmentNode = this.outputNode;

return quadMesh.renderAsync( this.renderer );

}

Expand Down

0 comments on commit b455ce8

Please sign in to comment.