-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Closed
Milestone
Description
Description
Vertex colors with alpha are rendered correctly with WebGLRenderer, but are fully opaque with WebGPURenderer.
Reproduction steps
- Create a 4-component Float32Array as RGBA
color
attribute of aBufferGeometry
- Load it with WebGPURenderer
Code
const colors = new Float32Array([
1, 0, 0, 0.5, 1, 0, 0, 0.5, 1, 0, 0, 0.5, 1, 0, 0, 0.5, 0, 1, 0, 0.5, 0, 1, 0,
0.5, 0, 1, 0, 0.5, 0, 1, 0, 0.5,
])
geometry.setAttribute('color', new THREE.BufferAttribute(colors, 4))
const material = new THREE.MeshLambertMaterial({
vertexColors: true,
transparent: true,
depthWrite: false,
side: THREE.DoubleSide,
})
Live example
- jsfiddle-latest-release WebGLRenderer
- jsfiddle-latest-release WebGPURenderer
- jsfiddle-dev WebGPURenderer
Screenshots
WebGLRenderer:
WebGPURenderer:
Version
175
Device
Desktop
Browser
Chrome
OS
MacOS
Metadata
Metadata
Assignees
Labels
No labels