bevy/examples/2d
Dusty DeWeese 82d849d3dc Add support for vertex colors (#4528)
# Objective

Add support for vertex colors

## Solution

This change is modeled after how vertex tangents are handled, so the shader is conditionally compiled with vertex color support if the mesh has the corresponding attribute set.

Vertex colors are multiplied by the base color. I'm not sure if this is the best for all cases, but may be useful for modifying vertex colors without creating a new mesh.

I chose `VertexFormat::Float32x4`, but I'd prefer 16-bit floats if/when support is added.

## Changelog

### Added
- Vertex colors can be specified using the `Mesh::ATTRIBUTE_COLOR` mesh attribute.
2022-05-05 00:46:32 +00:00
..
mesh2d.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
mesh2d_manual.rs Add support for vertex colors (#4528) 2022-05-05 00:46:32 +00:00
move_sprite.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
rotation.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
shapes.rs Add RegularPolygon and Circle meshes (#3730) 2022-05-05 00:03:47 +00:00
sprite.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
sprite_flipping.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
sprite_sheet.rs bevy_derive: Add derives for Deref and DerefMut (#4328) 2022-03-29 02:10:06 +00:00
text2d.rs Move Size to bevy_ui (#4285) 2022-04-25 13:54:46 +00:00
texture_atlas.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00