2024-04-16 14:27:17 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-16 14:40:20 +00:00
|
|
|
|
|
|
|
#[derive(Asset, TypePath, AsBindGroup, Debug, Clone)]
|
|
|
|
pub struct AsteroidSurface {
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Material for AsteroidSurface {
|
|
|
|
fn fragment_shader() -> ShaderRef {
|
|
|
|
"shaders/material_asteroid.wgsl".into()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|