makepad_draw/shader/draw_color.rs
1use {
2 crate::{
3 makepad_platform::*,
4 shader::draw_quad::DrawQuad
5 },
6};
7
8live_design!{
9 DrawColor= {{DrawColor}} {
10 fn pixel(self) -> vec4 {
11 return vec4(self.color.rgb*self.color.a, self.color.a);
12 }
13 }
14}
15
16#[derive(Live, LiveHook)]
17#[repr(C)]
18pub struct DrawColor {
19 #[deref] pub draw_super: DrawQuad,
20 #[live] pub color: Vec4
21}