Skip to content

Commit 9dcf6c2

Browse files
committed
Add comment.
1 parent 33e981e commit 9dcf6c2

File tree

1 file changed

+3
-0
lines changed
  • crates/processing_render/src/render

1 file changed

+3
-0
lines changed

crates/processing_render/src/render/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,9 @@ fn add_shape3d(res: &mut RenderResources, batch: &mut BatchState, state: &Render
539539
let mesh_handle = res.meshes.add(mesh);
540540
let fill_color = state.fill_color.unwrap_or(Color::WHITE);
541541
let material_handle = match &state.material_key {
542+
// TODO: in 2d, we use vertex colors. `to_material` becomes complicated if we also encode
543+
// a base color in the material, so for simplicity we just create a new material here
544+
// that is unlit and uses the fill color as the base color
542545
MaterialKey::Color { transparent, .. } => {
543546
let mat = StandardMaterial {
544547
base_color: fill_color,

0 commit comments

Comments
 (0)