Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Blending in WebGPU #27929

Closed
MrsDarth opened this issue Mar 16, 2024 · 1 comment
Closed

Custom Blending in WebGPU #27929

MrsDarth opened this issue Mar 16, 2024 · 1 comment
Labels
Milestone

Comments

@MrsDarth
Copy link

Description

Using custom blending in materials in webgpu will throw an error if the alpha blending is not specified.
image
The cause is because the default values are set to GPUBlendFactor which is then passed to _getBlendFactor which is wrong
https://github.com/mrdoob/three.js/blob/dev/examples/jsm/renderers/webgpu/utils/WebGPUPipelineUtils.js#L192

Reproduction steps

  1. Create a material with custom blending
  2. Do not specify blend alpha

Code

const material = new MeshBasicNodeMaterial();
material.blending = CustomBlending;
material.blendEquation = AddEquation;
material.blendSrc = OneFactor;
material.blendDst = OneMinusSrcColorFactor;

Live example

none

Screenshots

No response

Version

r162

Device

No response

Browser

No response

OS

No response

@sunag sunag added the WebGPU label Mar 17, 2024
@Mugen87
Copy link
Collaborator

Mugen87 commented Jul 23, 2024

Fixed via #28490.

@Mugen87 Mugen87 closed this as completed Jul 23, 2024
@Mugen87 Mugen87 added this to the r167 milestone Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants