I would like to know whether it is possible to set a repeat-count (“stride”?) for BufferGeometry attributes (THREE.Float32BufferAttribute). Specifically, I have certain data that is unchanging for each of the three triangle vertices. Rather than repeat the data 3x so that it exists at each vertex, I would like the vertex shader buffer index to increment by the given data-size every third frame. Is this possible? Thanks.
The only way to avoid data redundancy in buffer attributes is the usage of an index buffer. However, I’m not sure what you mean with “increment by the given data-size every third frame”. The usage of an index buffer is fixed. You define primitives (e.g. triangles ) by referring with indices (unsigned integers) to the vertex data in your other buffer attributes (position, normal, uv, color etc.).
Okay thanks, that answers it. All I was saying about data-size is that the attribute “my_attribute” could have a size, eg vec4, so vertices 0,1,2 would use “my_attribute”.float_array[0:3] and then vertices 3,4,5 would use “my_attribute”.float_array[4:7]. Sorry for not using real property names, but I hope the intent is clear.