pub struct RenderView {
pub target: ViewTarget,
pub name: String,
pub view_projection: Mat4,
pub frustum: Frustum,
pub viewport_size: (u32, u32),
pub csm_split: Option<f32>,
pub light_buffer_index: usize,
}Expand description
A unified rendering viewpoint.
Contains all data needed for CPU-side culling and GPU-side rendering from a single viewpoint.
Fields§
§target: ViewTargetIdentifies this view’s purpose (main camera, shadow cascade, etc.).
name: StringDebug name (e.g. "DirLight_42_Cascade_2").
view_projection: Mat4View-Projection matrix, uploaded to the GPU for vertex transformation.
frustum: FrustumFrustum extracted from view_projection, used for CPU frustum culling.
viewport_size: (u32, u32)Size of the render target for this view (width, height).
For shadow atlas: the region within the atlas.
For shadow array: typically (map_size, map_size).
csm_split: Option<f32>For CSM cascades: the far split distance in view space.
None for non-CSM views.
light_buffer_index: usizeIndex into the GPU light storage buffer. Only meaningful for shadow views.
Implementations§
Source§impl RenderView
impl RenderView
Sourcepub fn new_main_camera(vp: Mat4, frustum: Frustum, size: (u32, u32)) -> Self
pub fn new_main_camera(vp: Mat4, frustum: Frustum, size: (u32, u32)) -> Self
Create a new render view with the given parameters.
The frustum is automatically extracted from view_projection.