# \#bufferattributes

**URL:** https://discourse.threejs.org/tag/bufferattributes/972.md

[Latest](https://discourse.threejs.org/latest.md) · [Categories](https://discourse.threejs.org/categories.md) · [Tags](https://discourse.threejs.org/tags.md)

---

## [Getting data from GPU](https://discourse.threejs.org/t/getting-data-from-gpu/91080)

<div class="topic-metadata">

**Author:** [@yesbird](https://discourse.threejs.org/u/yesbird)\
**Replies:** 10\
**Last updated:** [April 20, 2026, 10:28am UTC](https://discourse.threejs.org/t/getting-data-from-gpu/91080 "2026-04-20T10:28:41Z")

</div>

Greetings ! I am working on Attractors extension to Rebelle painting software based on this canonical example but can’t fetch particles coordinates from GPU buffer. At preset time I am stacked with a following attempt …

---

## [How to use interleaved buffers with TSL?](https://discourse.threejs.org/t/how-to-use-interleaved-buffers-with-tsl/83347)

<div class="topic-metadata">

**Author:** [@Fennec](https://discourse.threejs.org/u/Fennec)\
**Replies:** 2\
**Last updated:** [June 3, 2025, 1:48pm UTC](https://discourse.threejs.org/t/how-to-use-interleaved-buffers-with-tsl/83347 "2025-06-03T13:48:21Z")

</div>

I’m aware of StorageBufferAttribute andStorageInstancedBufferAttribute, but couldn’t find any equivalent to InterleavedBuffer,InstancedInterleavedBufferor InterleavedBufferAttribute.

---

## [Attribute bound to several buffers possible? (or maping a buffer)](https://discourse.threejs.org/t/attribute-bound-to-several-buffers-possible-or-maping-a-buffer/83422)

<div class="topic-metadata">

**Author:** [@DarkPhoenix](https://discourse.threejs.org/u/DarkPhoenix)\
**Replies:** 4\
**Last updated:** [June 2, 2025, 7:36pm UTC](https://discourse.threejs.org/t/attribute-bound-to-several-buffers-possible-or-maping-a-buffer/83422 "2025-06-02T19:36:38Z")

</div>

Is it possible to bind one attribute to several buffers? Or map attribute to pull from a buffer at different offset. Allow me to explain my madness: const posArray = instancedArray(count, 'vec3') myInstanceMesh.insta…

---

## [RapierHelper - Debug buffer geometry not updating with WebGPURenderer](https://discourse.threejs.org/t/rapierhelper-debug-buffer-geometry-not-updating-with-webgpurenderer/81919)

<div class="topic-metadata">

**Author:** [@EmanYmton](https://discourse.threejs.org/u/EmanYmton)\
**Replies:** 1\
**Last updated:** [May 2, 2025, 3:30pm UTC](https://discourse.threejs.org/t/rapierhelper-debug-buffer-geometry-not-updating-with-webgpurenderer/81919 "2025-05-02T15:30:49Z")

</div>

Hello everyone, I tried to use RapierHelper (available from r176) to debug a RapierJS physic world, based on the three.js physics - rapier3d character controller exemple, rendered with WebGPURenderer. The physic works …

---

## [BufferAttribute subclasses force unnecessary memory allocation](https://discourse.threejs.org/t/bufferattribute-subclasses-force-unnecessary-memory-allocation/77567)

<div class="topic-metadata">

**Author:** [@trusktr](https://discourse.threejs.org/u/trusktr)\
**Replies:** 1\
**Last updated:** [February 4, 2025, 7:11pm UTC](https://discourse.threejs.org/t/bufferattribute-subclasses-force-unnecessary-memory-allocation/77567 "2025-02-04T19:11:23Z")

</div>

For example, check out the Float32BufferAttribute class: It is impossible to bypass the forced buffer allocation: const existingBuffer = new Float32Array(...) new Float32BufferAttribute(existingBuffer, 3) // forces …

---

## [Error: Resizing buffer attributes is not supported (can it be?)](https://discourse.threejs.org/t/error-resizing-buffer-attributes-is-not-supported-can-it-be/77109)

<div class="topic-metadata">

**Author:** [@trusktr](https://discourse.threejs.org/u/trusktr)\
**Replies:** 4\
**Last updated:** [January 27, 2025, 8:13am UTC](https://discourse.threejs.org/t/error-resizing-buffer-attributes-is-not-supported-can-it-be/77109 "2025-01-27T08:13:40Z")

</div>

I have been wondering if I could update an attribute buffer. I tried here, but after 2 seconds when the resize attempt happens, you’ll see this in console: Error: THREE.WebGLAttributes: The size of the buffer attribu…

---

## [GPUBuffer to BufferAttribute](https://discourse.threejs.org/t/gpubuffer-to-bufferattribute/73531)

<div class="topic-metadata">

**Author:** [@PatrickCelentano](https://discourse.threejs.org/u/PatrickCelentano)\
**Replies:** 5\
**Last updated:** [November 4, 2024, 2:28am UTC](https://discourse.threejs.org/t/gpubuffer-to-bufferattribute/73531 "2024-11-04T02:28:10Z")

</div>

Hello! I’ve recently started writing simulations with WebGPU and am interested in using ThreeJS for the rendering. I was curious if it’s possible to efficiently turn some output GPUBuffer into a BufferAttribute (for ex…

---

## [Nodysseus: a node-based editor for the web with three.js bindings](https://discourse.threejs.org/t/nodysseus-a-node-based-editor-for-the-web-with-three-js-bindings/53483)

<div class="topic-metadata">

**Author:** [@ulysses](https://discourse.threejs.org/u/ulysses)\
**Replies:** 5\
**Last updated:** [September 12, 2024, 4:07pm UTC](https://discourse.threejs.org/t/nodysseus-a-node-based-editor-for-the-web-with-three-js-bindings/53483 "2024-09-12T16:07:35Z")

</div>

Hey everyone, I’d like to introduce you all to Nodysseus (https://nodysseus.io), a node-based editor for the web. It’s got three.js bindings integrated into the editor both for regular three.js and three.js’ exciting ne…

---

## [Color array changes after applying CSG](https://discourse.threejs.org/t/color-array-changes-after-applying-csg/70389)

<div class="topic-metadata">

**Author:** [@AshhadDevLab](https://discourse.threejs.org/u/AshhadDevLab)\
**Replies:** 4\
**Last updated:** [September 10, 2024, 12:26pm UTC](https://discourse.threejs.org/t/color-array-changes-after-applying-csg/70389 "2024-09-10T12:26:34Z")

</div>

I am applying csg using three-bvh-csg on a .glb model, the issue is that the .glb model has colors on it and I want to keep the colors even after the csg has been applied. Here is the code responsible for applying the c…

---

## [How to update a bufferAttribute that is being passed to a compute shader WEBGPU](https://discourse.threejs.org/t/how-to-update-a-bufferattribute-that-is-being-passed-to-a-compute-shader-webgpu/68627)

<div class="topic-metadata">

**Author:** [@Math\_Whittaker](https://discourse.threejs.org/u/Math_Whittaker)\
**Replies:** 0\
**Last updated:** [July 26, 2024, 12:31pm UTC](https://discourse.threejs.org/t/how-to-update-a-bufferattribute-that-is-being-passed-to-a-compute-shader-webgpu/68627 "2024-07-26T12:31:27Z")

</div>

Hi, I wondered if anyone could help me I have a mesh that I am doing analysis on in a compute shader using the WEBGPU renderer. I update the vertices in the buffer I am using to store the vertex data and then set .needs…

---

## [Issue with Updating Face Color and Position on Click for Indexed Geometry in Three.js](https://discourse.threejs.org/t/issue-with-updating-face-color-and-position-on-click-for-indexed-geometry-in-three-js/67937)

<div class="topic-metadata">

**Author:** [@nastapecko](https://discourse.threejs.org/u/nastapecko)\
**Replies:** 3\
**Last updated:** [July 9, 2024, 4:57pm UTC](https://discourse.threejs.org/t/issue-with-updating-face-color-and-position-on-click-for-indexed-geometry-in-three-js/67937 "2024-07-09T16:57:23Z")

</div>

Hi, I’m working on a project in Three.js where I need to update the face color and position on click(using raycaster). I’ve created a basic shape using the IcosahedronGeometry and merged the vertices to achive indexed g…

---

## [Setting attributes.position to a rounded number](https://discourse.threejs.org/t/setting-attributes-position-to-a-rounded-number/51111)

<div class="topic-metadata">

**Author:** [@Lawrence3DPK](https://discourse.threejs.org/u/Lawrence3DPK)\
**Replies:** 5\
**Last updated:** [May 3, 2023, 1:41pm UTC](https://discourse.threejs.org/t/setting-attributes-position-to-a-rounded-number/51111 "2023-05-03T13:41:21Z")

</div>

Hey, I’m encountering a very odd situation with trying to round up values of the bufferGeometry.attribues.position.array of a gltf model, the function i’m using is as follows (where (c) is a mesh fed to the function)… c…

---

## [Transform individual Vertices from Position fromBufferAttribute](https://discourse.threejs.org/t/transform-individual-vertices-from-position-frombufferattribute/44898)

<div class="topic-metadata">

**Author:** [@jason6](https://discourse.threejs.org/u/jason6)\
**Replies:** 2\
**Last updated:** [November 19, 2022, 12:45pm UTC](https://discourse.threejs.org/t/transform-individual-vertices-from-position-frombufferattribute/44898 "2022-11-19T12:45:13Z")

</div>

Hey, I guess I have a bit of a lower level issue. I’m currently trying to modify an Object 3D (represented in a scene graph) by transforming it’s vertices directly. Getting them from local space to world space to view sp…

---

## [Translation Issue? 4x4 Transformation Matrix "flattening" 3d model](https://discourse.threejs.org/t/translation-issue-4x4-transformation-matrix-flattening-3d-model/44007)

<div class="topic-metadata">

**Author:** [@chron1cle](https://discourse.threejs.org/u/chron1cle)\
**Replies:** 3\
**Last updated:** [October 25, 2022, 9:30pm UTC](https://discourse.threejs.org/t/translation-issue-4x4-transformation-matrix-flattening-3d-model/44007 "2022-10-25T21:30:34Z")

</div>

Hi all, so I have a series of vertices stored in a BufferAttribute in which I need to translate 100 units on the z axis. I see that there’s an applyMatrix4 method in which I can apply a 4x4 transformation matrix to accom…

---

## [Can GLBufferAttribute be used with index?](https://discourse.threejs.org/t/can-glbufferattribute-be-used-with-index/39085)

<div class="topic-metadata">

**Author:** [@vegarringdal](https://discourse.threejs.org/u/vegarringdal)\
**Replies:** 5\
**Last updated:** [June 10, 2022, 10:37am UTC](https://discourse.threejs.org/t/can-glbufferattribute-be-used-with-index/39085 "2022-06-10T10:37:29Z")

</div>

Can GLBufferAttribute be used with index? If so, do anyone know about a working sample? Only found this one, but its not using setIndex with buffer geometry https://threejs.org/examples/?q=GLBufferAttribute#webgl\_buff…

---

## [How to use InstancedBufferAttribute with Uint8Array?](https://discourse.threejs.org/t/how-to-use-instancedbufferattribute-with-uint8array/39051)

<div class="topic-metadata">

**Author:** [@benzsuankularb](https://discourse.threejs.org/u/benzsuankularb)\
**Replies:** 2\
**Last updated:** [June 9, 2022, 7:18am UTC](https://discourse.threejs.org/t/how-to-use-instancedbufferattribute-with-uint8array/39051 "2022-06-09T07:18:52Z")

</div>

I’ve found that when I put Uint8Array into the InstancedBufferAttribute, WebGL fired an error for an invalid type. However, it works with Float32Array. I know we have UInt8BufferAttribute but are there any ways to ach…

---

## [From threejs to R3F: setXYZ bufferAttribute](https://discourse.threejs.org/t/from-threejs-to-r3f-setxyz-bufferattribute/33255)

<div class="topic-metadata">

**Author:** [@digitH](https://discourse.threejs.org/u/digitH)\
**Replies:** 5\
**Last updated:** [January 4, 2022, 12:40pm UTC](https://discourse.threejs.org/t/from-threejs-to-r3f-setxyz-bufferattribute/33255 "2022-01-04T12:40:51Z")

</div>

Hello! I try to use a conveyor in my simulation. I found this code that fits quite well with what I want, except that I work with R3F. I tried to convert this code, but I can’t get the bufferAttribute part to work. I …

---

## [Getting accurate BufferGeometry position attributes after displacementMap applied to MeshStandardMaterial](https://discourse.threejs.org/t/getting-accurate-buffergeometry-position-attributes-after-displacementmap-applied-to-meshstandardmaterial/32928)

<div class="topic-metadata">

**Author:** [@JamT](https://discourse.threejs.org/u/JamT)\
**Replies:** 1\
**Last updated:** [December 24, 2021, 2:16pm UTC](https://discourse.threejs.org/t/getting-accurate-buffergeometry-position-attributes-after-displacementmap-applied-to-meshstandardmaterial/32928 "2021-12-24T14:16:50Z")

</div>

Hi all. I’m applying a displacementMap to a material which is applied to a glb model of type BufferGeometry. I’d like to add other objects to the vertices positions of the model, but I can only seem to get pre-displaced …

---

## [How to make an animated IcosahedronGeometry "blob" with perlin noise?](https://discourse.threejs.org/t/how-to-make-an-animated-icosahedrongeometry-blob-with-perlin-noise/26236)

<div class="topic-metadata">

**Author:** [@Tim](https://discourse.threejs.org/u/Tim)\
**Replies:** 6\
**Last updated:** [May 14, 2021, 9:46am UTC](https://discourse.threejs.org/t/how-to-make-an-animated-icosahedrongeometry-blob-with-perlin-noise/26236 "2021-05-14T09:46:10Z")

</div>

Hey all! I’ve been playing with Three.js for the last few days, but by now I got stuck because all the differences in builds and examples on the internet. :slight\_smile: Them main item I get stuck on is IcosahedronGeom…

---

## [Simplest way to add a vector to bufferAttribute?](https://discourse.threejs.org/t/simplest-way-to-add-a-vector-to-bufferattribute/23806)

<div class="topic-metadata">

**Author:** [@prominent](https://discourse.threejs.org/u/prominent)\
**Replies:** 7\
**Last updated:** [February 25, 2021, 3:31am UTC](https://discourse.threejs.org/t/simplest-way-to-add-a-vector-to-bufferattribute/23806 "2021-02-25T03:31:34Z")

</div>

var vector = new THREE.Vector2( shiftX,shiftY ); let uvAttr = geometry.attributes.uv; let idx = geometry.index; switch(part\[s\].vertices\[v\]){ case idx.getX(0) : uvAttr.setXY( uvAttr.getX( idx.getX(0) )+vect…

---

## [Custom bufferAttributes?](https://discourse.threejs.org/t/custom-bufferattributes/23772)

<div class="topic-metadata">

**Author:** [@prominent](https://discourse.threejs.org/u/prominent)\
**Replies:** 2\
**Last updated:** [February 23, 2021, 10:08pm UTC](https://discourse.threejs.org/t/custom-bufferattributes/23772 "2021-02-23T22:08:26Z")

</div>

BufferAttribute This class stores data for an attribute (such as vertex positions, face indices, normals, colors, UVs, and any custom attributes ) So I assume I can do such as: geometry.setAttribute( 'giraffe', new …
