Skip to content

Commit

Permalink
Examples: remove unused render pass for webgpu mrt readback (#28219)
Browse files Browse the repository at this point in the history
Co-authored-by: aardgoose <angus.sawyer@email.com>
  • Loading branch information
aardgoose and aardgoose committed Apr 25, 2024
1 parent 721ad38 commit e408f88
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/webgpu_multiple_rendertargets_readback.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,18 @@

async function render( time ) {

const selection = options.selection;

torus.rotation.y = ( time / 1000 ) * .4;

// render scene into target
renderer.setRenderTarget( renderTarget );
renderer.setRenderTarget( selection === 'mrt' ? renderTarget : readbackTarget );
renderer.render( scene, camera );

// render post FX
renderer.setRenderTarget( null );

if ( options.selection === 'mrt' ) {
if ( selection === 'mrt' ) {

quadMesh.material = material;

Expand All @@ -219,10 +221,6 @@

async function readback() {

renderer.setRenderTarget( readbackTarget );
renderer.render( scene, camera );
renderer.setRenderTarget( null );

const width = readbackTarget.width;
const height = readbackTarget.height;

Expand Down

0 comments on commit e408f88

Please sign in to comment.