pub struct GpuLight {
pub position: [f32; 3],
pub radius: f32,
pub color: [f32; 3],
pub intensity: f32,
pub casts_shadow: bool,
pub spot_dir: [f32; 3],
pub cos_inner: f32,
pub cos_outer: f32,
}Expand description
A point light in a grid’s local space, as handed to
GpuRenderer::set_scene_lights. The facade transforms world-space
roxlap_render::PointLights into each grid’s frame.
Fields§
§position: [f32; 3]Grid-local position (voxel units).
radius: f32Hard cutoff distance, world/voxel units.
color: [f32; 3]Linear RGB, 0..1.
intensity: f32§casts_shadow: bool§spot_dir: [f32; 3]SL — spot (cone) axis: unit direction the light shines along,
in the same frame as Self::position (grid-local for the scene
pass, world for the sprite pass). Ignored when Self::cos_outer
is -1.0.
cos_inner: f32SL — cosine of the inner cone half-angle (full brightness within it).
cos_outer: f32SL — cosine of the outer cone half-angle (zero past it; soft between).
-1.0 (180° cone) ⇒ a pure point light: the cone mask is skipped.
Trait Implementations§
impl Copy for GpuLight
impl StructuralPartialEq for GpuLight
Auto Trait Implementations§
impl Freeze for GpuLight
impl RefUnwindSafe for GpuLight
impl Send for GpuLight
impl Sync for GpuLight
impl Unpin for GpuLight
impl UnsafeUnpin for GpuLight
impl UnwindSafe for GpuLight
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more