pub struct Atlas2D {
pub texture: RwLock<Option<TextureId>>,
pub view: RwLock<Option<TextureViewId>>,
}Expand description
2D atlas resources — owned by whichever shadows lane created it.
Fields§
§texture: RwLock<Option<TextureId>>Texture id (depth-only).
view: RwLock<Option<TextureViewId>>D2Array view bound by the lit shader at
[khora_data::render::shadow_bindings::binding::ATLAS_2D].
Implementations§
Source§impl Atlas2D
impl Atlas2D
Sourcepub fn create(
&self,
device: &dyn GraphicsDevice,
resolution: u32,
max_lights: u32,
label: &str,
) -> Result<(), RenderError>
pub fn create( &self, device: &dyn GraphicsDevice, resolution: u32, max_lights: u32, label: &str, ) -> Result<(), RenderError>
Creates the depth atlas + array view at the requested dimensions.
Idempotent — call once at on_initialize.
resolution is the per-layer side length in texels;
max_lights is the number of array layers (== number of shadow
casters this lane will accept per frame).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Atlas2D
impl RefUnwindSafe for Atlas2D
impl Send for Atlas2D
impl Sync for Atlas2D
impl Unpin for Atlas2D
impl UnsafeUnpin for Atlas2D
impl UnwindSafe for Atlas2D
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