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: f32Scalar multiplier on Self::color in the diffuse term
(albedo · color · intensity · N·L · falloff). 1.0 = nominal;
values above 1 over-brighten.
casts_shadow: boolWhether this light marches occlusion (shadow) rays. Honoured up
to the MAX_SHADOW_CASTERS budget (the sun counts as one);
over-budget lights are demoted to shadowless with a warning.
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.