bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Add alpha mode implementation to shader_material_2d

Open Leinnan opened this issue 1 year ago • 2 comments

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.

Leinnan avatar Dec 02 '24 10:12 Leinnan

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.

IceSentry avatar Dec 02 '24 17:12 IceSentry

@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.

Leinnan avatar Dec 02 '24 19:12 Leinnan