Bevy: Enabling transparency is cumbersome

Created on 20 Jul 2020  路  1Comment  路  Source: bevyengine/bevy

Currently when using common materials like ColorMaterial and StandardMaterial, users need to remember to enable draw.is_transparent. This will be a common "foot gun" and it should really happen automatically if the color has an alpha component.

// currently this is required
world.spawn(NodeComponents {
    material: materials.add(Color::rgba(1.0, 0.9, 0.9, 0.4).into()),
    draw: Draw {
        is_transparent: true,
        ..Default::default()
    },
    ..Default::default()
})

// ideally the `0.4` alpha value results in alpha transparency
world.spawn(NodeComponents {
    material: materials.add(Color::rgba(1.0, 0.9, 0.9, 0.4).into()),
    ..Default::default()
})
enhancement rendering

>All comments

Yeah I just shot myself in the foot with this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PradeepKumarRajamanickam picture PradeepKumarRajamanickam  路  4Comments

navaati picture navaati  路  5Comments

ben186 picture ben186  路  5Comments

jamadazi picture jamadazi  路  4Comments

vultix picture vultix  路  3Comments