bevy/examples/3d
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
..
3d_scene.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
lighting.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
load_gltf.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
msaa.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
orthographic.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
parenting.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
pbr.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
render_to_texture.rs Render to texture example: No need to create an image handle manually. (#4223) 2022-03-16 01:53:04 +00:00
shadow_biases.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
shadow_caster_receiver.rs ParamSet for conflicting SystemParam:s (#2765) 2022-03-29 23:39:38 +00:00
shapes.rs Add 3d shapes example (#4613) 2022-05-02 13:20:56 +00:00
spherical_area_lights.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
texture.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
two_passes.rs Add infallible resource getters for WorldCell (#4104) 2022-04-25 23:19:13 +00:00
update_gltf_scene.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
vertex_colors.rs Add support for vertex colors (#4528) 2022-05-05 00:46:32 +00:00
wireframe.rs default() shorthand (#4071) 2022-03-01 20:52:09 +00:00