use crate::plugin::{EffectParams, EffectPlugin};
use crate::utils::RenderError;
pub struct GlowEffect {
radius: f32,
}
impl GlowEffect {
pub fn new(radius: f32) -> Self {
Self { radius }
}
}
impl EffectPlugin for GlowEffect {
fn name(&self) -> &str {
"Glow"
}
fn version(&self) -> &str {
"1.0.0"
}
fn apply_cpu(
&self,
pixels: &mut [u8],
width: u32,
height: u32,
params: &EffectParams,
) -> Result<(), RenderError> {
let strength = params.strength;
let _ = (pixels, width, height, strength, self.radius);
Ok(())
}
fn shader_code(&self) -> Option<&str> {
None
}
}