I have a question about the THREE.DataArrayTexture.
If I pass huge arrays to shader and then process them in the shader, it doesn’t cause any problems. However, if I pass such an array to a THREE.DataArrayTexture, this leads to brief stutters.
I only use linear min and mag filters. What arithmetic operations does the THREE.DataArrayTexture perform?
I had the idea of doing without the THREE.DataArrayTexture and then reading and processing the array manually in the shader. Because I know exactly which array element has which color value and to which coordinates it belongs.
To what extent can the bottleneck between CPU and GPU lead to stuttering?
How are you passing large arrays to the shader, if not with a texture? Could you share a code excerpt or a demo? Also note that if you just have a single array, you probably want THREE.DataTexture, not THREE.DataArrayTexture.
I pass large arrays to a geometry via attributes and the shader can access them.
geometry.setAttribute('coords', new THREE.Float32BufferAttribute(data.coords, 3));
geometry.attributes.coords.needsUpdate = true;
But your objection is justified because I only pass an array initially when I create a geometry object and no longer while it exists. I didn’t have that in mind when I first thought about it.
My software is very big. I would have to create a small example