pub struct Light2dDesc {
pub lightmap_scale: f32,
pub mask_size: u32,
pub filter: TextureFilter,
pub textures_gen: u64,
pub budget: LightBudget,
}Expand description
Construction parameters for one Light2dPass.
Fields§
§lightmap_scale: f32Light map resolution as a fraction of the render target, clamped to
0.25..=1.0. Half resolution is usually indistinguishable and a
quarter of the memory.
mask_size: u32Shadow mask edge in pixels, clamped to 64..=2048. The mask is
stretched over each light’s footprint, so a smaller mask softens shadow
edges and never moves a shadow.
filter: TextureFilterSampling for falloff textures; the shadow mask is always linear.
textures_gen: u64Generation of the queued textures. Uploads are applied when it changes, so a game that queues its level’s textures once pays for them once.
budget: LightBudgetPer-frame limits, enforced by
plan_lighting with typed issues.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Light2dDesc
impl RefUnwindSafe for Light2dDesc
impl Send for Light2dDesc
impl Sync for Light2dDesc
impl Unpin for Light2dDesc
impl UnsafeUnpin for Light2dDesc
impl UnwindSafe for Light2dDesc
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.