#[derive(Debug, thiserror::Error)]
pub enum LightProbeError {
#[error("Invalid cubemap resolution {res}: must be power of 2 and >= 4")]
InvalidResolution { res: u32 },
#[error("Buffer length mismatch: expected {expected}, got {got}")]
BufferMismatch { expected: usize, got: usize },
#[error("Empty probe list")]
EmptyProbeList,
#[error("Invalid SH order {order}: must be 1, 2, or 3")]
InvalidOrder { order: usize },
#[error("Invalid direction vector (zero length)")]
ZeroDirection,
#[error("Invalid image dimensions {width}x{height}: both must be > 0")]
InvalidImageDimensions { width: u32, height: u32 },
#[error("Too many probes: {count} exceeds LightProbeConfig::max_probes ({max})")]
TooManyProbes { count: usize, max: usize },
}