Skip to content

WebGPURenderer - Alpha not supported in vertex colors #30973

@verekia

Description

@verekia

Description

Vertex colors with alpha are rendered correctly with WebGLRenderer, but are fully opaque with WebGPURenderer.

Reproduction steps

  1. Create a 4-component Float32Array as RGBA color attribute of a BufferGeometry
  2. 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

Screenshots

WebGLRenderer:
Image
WebGPURenderer:
Image

Version

175

Device

Desktop

Browser

Chrome

OS

MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions