Skip to content

Renderer: Blending with transparent background is incorrect. #33104

@gkjohnson

Description

@gkjohnson

Description

I know that blending in WebGPURenderer is now happening in Linear sRGB space but even so the result when rendering to a transparent background looks very wrong, though it's not exactly clear what's going wrong. It looks like a premultiplied alpha issue if I were to guess?

Reproduction steps

  1. Set the clear color to a completely transparent value
  2. Render a partially transparent object
  3. Notice a different blending profile than if a solid background color were used

Code

See fiddle

Live example

https://jsfiddle.net/wj05d67x/2/

Screenshots

bg color=#eee, alpha=0 bg color=#eee, alpha=1
WebGPURenderer Image Image
WebGLRenderer Image Image

Version

r183

Device

No response

Browser

No response

OS

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions