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

Add alpha mode implementation to shader_material_2d #16603

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Leinnan
Copy link
Contributor

@Leinnan Leinnan commented Dec 2, 2024

Objective

Bevy 0.15 introduced new method in Material2d trait- alpha_mode. Before that when new material was created it had alpha blending, now it does not.

Solution

While I am okay with it, it could be useful to add the new trait method implementation to one of the samples so users are more aware of it.

@notashes notashes added C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Dec 2, 2024
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 2, 2024
@IceSentry
Copy link
Contributor

IceSentry commented Dec 2, 2024

This is already covered in more details in the mesh2d_alpha_mode example.

If we add an alpha mode to this example it should be AlphaMode2d::Mask(0.5), not Blend because it doesn't need blending. It should also point to the above example.

@Leinnan
Copy link
Contributor Author

Leinnan commented Dec 2, 2024

@IceSentry I would argue that is not covered for the Custom materials part. In 0.14 if you implemented a custom material that was by default a blend one, since 0.15 it changed. Other than that, I think it could be AlphaMode2d::Mask(0.5), I will change it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants