pub struct AtlasCube {
pub texture: RwLock<Option<TextureId>>,
pub view: RwLock<Option<TextureViewId>>,
pub face_views: RwLock<Vec<TextureViewId>>,
}Expand description
Cube atlas resources — owned by whichever shadows lane created it.
Fields§
§texture: RwLock<Option<TextureId>>Underlying 2D-array texture id.
view: RwLock<Option<TextureViewId>>CubeArray view bound by the lit shader at
[khora_data::render::shadow_bindings::binding::ATLAS_CUBE].
face_views: RwLock<Vec<TextureViewId>>Per-face 2D views used as depth render targets when rasterising
each cube face. Indexed cube_layer * 6 + face_index (with
face_index matching [khora_core::math::CubeFace::index]).
Implementations§
Source§impl AtlasCube
impl AtlasCube
Sourcepub fn create(
&self,
device: &dyn GraphicsDevice,
face_resolution: u32,
max_cubes: u32,
label: &str,
) -> Result<(), RenderError>
pub fn create( &self, device: &dyn GraphicsDevice, face_resolution: u32, max_cubes: u32, label: &str, ) -> Result<(), RenderError>
Creates the cube depth atlas + cube-array view + per-face views at
the requested dimensions. Idempotent — call once at
on_initialize.
Sourcepub fn face_views_snapshot(&self) -> Vec<TextureViewId>
pub fn face_views_snapshot(&self) -> Vec<TextureViewId>
Returns a clone of the per-face view list (cheap — just Vec<TextureViewId>).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AtlasCube
impl RefUnwindSafe for AtlasCube
impl Send for AtlasCube
impl Sync for AtlasCube
impl Unpin for AtlasCube
impl UnsafeUnpin for AtlasCube
impl UnwindSafe for AtlasCube
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