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

Material: Add missing blending factors. #26949

Merged
merged 1 commit into from
Oct 11, 2023
Merged

Material: Add missing blending factors. #26949

merged 1 commit into from
Oct 11, 2023

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Oct 11, 2023

Fixed #23741.

Description

This PR adds the following missing blend factors:

THREE.ConstantColorFactor
THREE.OneMinusConstantColorFactor
THREE.ConstantAlphaFactor
THREE.OneMinusConstantAlphaFactor

It also adds Material.blendColor and Material.blendAlpha to make the constant blend color configurable.

The PR is implement based on the following proposal: #23754 (comment)

@Mugen87 Mugen87 added this to the r158 milestone Oct 11, 2023
@github-actions
Copy link

github-actions bot commented Oct 11, 2023

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
650.2 kB (161.2 kB) 651 kB (161.3 kB) +811 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
443.1 kB (107.2 kB) 443.7 kB (107.3 kB) +528 B
@LeviPesin
Copy link
Contributor

Should we now replace WebGPURenderer's GPUBlendFactor with these new core constants, now that all of them are supported? (I actually prefer more the WebGPUConstants' approach of defining these factors and etc in an object instead of just bunch of variables) /ping @sunag

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Oct 11, 2023

I think it's okay of keeping them for now. Besides, this is a general topic and not specific to blending factors.

@Mugen87 Mugen87 merged commit 964e5d2 into mrdoob:dev Oct 11, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants