I’m using BufferGeometryUtils.mergeGeometries() and creating the color attribute
const rgb = material.color.toArray().map(v => v * 100);
let upOpacity = 600;
let newOpacity = material.opacity * upOpacity;
if (material.opacity == 1) {
newOpacity = 1000;
}
rgb.push(newOpacity);
const numVerts = geometry.getAttribute('position').count;
const itemSize = 4;
const colors = new Uint8Array(itemSize * numVerts);
colors.forEach((v, ndx) => {
let index = ndx % 4;
colors[ndx] = rgb[index];
});
const normalized = true;
return new BufferAttribute(colors, itemSize, normalized);
When using WebGLRenderer, everything worked, when switching to WebGPURenderer, transparency disappeared. I’ve tried everything a lot, maybe I’m missing something?