Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSL: BufferAttributeNode - Fix setUsage on non-InterleavedBuffer #28742

Merged
merged 4 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 6 additions & 0 deletions examples/jsm/nodes/accessors/BufferAttributeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ class BufferAttributeNode extends InputNode {

this.usage = value;

if ( this.attribute && this.attribute.isBufferAttribute === true ) {

this.attribute.usage = value;

}

return this;

}
Expand Down
Binary file modified examples/screenshots/webgpu_reflection.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions examples/webgpu_instance_mesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@

}

mesh.instanceMatrix.needsUpdate = true;

}

await renderer.render( scene, camera );
Expand Down
4 changes: 2 additions & 2 deletions examples/webgpu_postprocessing_dof.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@

}

mesh.instanceColor.setUsage( THREE.DynamicDrawUsage );

// renderer

renderer = new WebGPURenderer( { antialias: true } );
Expand Down Expand Up @@ -207,8 +209,6 @@

}

mesh.instanceColor.needsUpdate = true;

postProcessing.render();

}
Expand Down