pub struct DirectionalLightUnit {
pub lux_per_unit: f32,
}Expand description
What one unit of the source’s own value of a directional light (its sun) is in lux: the calibration the lowering that
made the scene’s sun (core.environment’s) chose. The sun’s intensity is its source value times lux_per_unit, so
color * intensity / lux_per_unit is the value the source stored, the one a program of the source reads its sun in
(crate::shader::FrameParameter::LightColour). The lowering that makes the sun writes it; a world whose sun no
lowering made has none.
Fields§
§lux_per_unit: f32Lux per unit of the source’s directional light value; finite and above 0.
Trait Implementations§
Source§impl Clone for DirectionalLightUnit
impl Clone for DirectionalLightUnit
impl Copy for DirectionalLightUnit
Source§impl Debug for DirectionalLightUnit
impl Debug for DirectionalLightUnit
Source§impl PartialEq for DirectionalLightUnit
impl PartialEq for DirectionalLightUnit
Source§impl Resource for DirectionalLightUnit
impl Resource for DirectionalLightUnit
Source§fn verify(&self, _w: &World) -> Result<(), String>
fn verify(&self, _w: &World) -> Result<(), String>
A finite factor above 0: a sun of the source’s value 1 has some intensity.
const NAME: &'static str = "core.directional_light_unit"
const VERSION: u32 = 1
Source§fn references(&self, _out: &mut Vec<Entity>)
fn references(&self, _out: &mut Vec<Entity>)
The entities this resource refers to, appended to
out. A resource holding entity references must declare
every one of them and implement Resource::retain_references.Source§fn retain_references(&mut self, _keep: &dyn Fn(Entity) -> bool)
fn retain_references(&mut self, _keep: &dyn Fn(Entity) -> bool)
Forget every reference to an entity
keep refuses (set it to “none”). The world calls it whenever entities
leave it (World::despawn, World::retain, World::move_components) and on the copy a
World::subset or World::split_off part gets, so a resource never refers to an entity its world lacks.Source§impl Serialize for DirectionalLightUnit
impl Serialize for DirectionalLightUnit
impl StructuralPartialEq for DirectionalLightUnit
Auto Trait Implementations§
impl Forget for DirectionalLightUnit
impl Freeze for DirectionalLightUnit
impl RefUnwindSafe for DirectionalLightUnit
impl Send for DirectionalLightUnit
impl Sync for DirectionalLightUnit
impl Unpin for DirectionalLightUnit
impl UnsafeUnpin for DirectionalLightUnit
impl UnwindSafe for DirectionalLightUnit
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