use bevy::prelude::*; use bevy::render::render_resource::{AsBindGroup, ShaderRef}; #[derive(Asset, TypePath, AsBindGroup, Debug, Clone)] pub struct JupitersRing { pub alpha_mode: AlphaMode, #[uniform(0)] pub ring_radius: f32, #[uniform(1)] pub jupiter_radius: f32, } impl Material for JupitersRing { fn fragment_shader() -> ShaderRef { "shaders/jupiters_rings.wgsl".into() } fn alpha_mode(&self) -> AlphaMode { self.alpha_mode } }