-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Add support for opaque, alpha mask, and alpha blend modes #3072
Changes from 14 commits
7fdf449
277818d
f018006
93bcc40
6ce7aa3
daca2ac
13524b4
42fa44c
9262c8f
e9ffbbe
79f195f
931dac9
48d79e9
4f1c53b
c571ff0
651c79c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use bevy_ecs::reflect::ReflectComponent; | ||
use bevy_reflect::Reflect; | ||
|
||
// FIXME: This should probably be part of bevy_render2! | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cart Where do you think this should live? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The set of available values here is specific to the |
||
/// Alpha mode | ||
#[derive(Debug, Reflect, Clone, PartialEq)] | ||
#[reflect(Component)] | ||
pub enum AlphaMode { | ||
Opaque, | ||
/// An alpha cutoff must be supplied where alpha values >= the cutoff | ||
/// will be fully opaque and < will be fully transparent | ||
Mask(f32), | ||
Blend, | ||
} | ||
|
||
impl Eq for AlphaMode {} | ||
|
||
impl Default for AlphaMode { | ||
fn default() -> Self { | ||
AlphaMode::Opaque | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine for now, but this seems ripe for parallel command encoding (once we start doing that). Breaking this up into 3 separate nodes might make that easier.