1pub mod solid;
2
3#[cfg(feature = "gradient")]
4pub mod gradient;
5
6const INITIAL_INSTANCES: usize = 16;
7
8fn color_target_state(format: wgpu::TextureFormat) -> [Option<wgpu::ColorTargetState>; 1] {
9 [Some(wgpu::ColorTargetState {
10 format,
11 blend: Some(wgpu::BlendState {
12 color: wgpu::BlendComponent {
13 src_factor: wgpu::BlendFactor::SrcAlpha,
14 dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha,
15 operation: wgpu::BlendOperation::Add,
16 },
17 alpha: wgpu::BlendComponent {
18 src_factor: wgpu::BlendFactor::One,
19 dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha,
20 operation: wgpu::BlendOperation::Add,
21 },
22 }),
23 write_mask: wgpu::ColorWrites::ALL,
24 })]
25}