pub struct ThreeDRenderLimits { /* private fields */ }Expand description
Frozen opt-in limits for geometry, textures and the desktop 3D passes.
Defaults are all zero. Every visible cuboid consumes twelve triangles and at most twenty-four edge segments when both wireframe modes are selected. Target pixels include one color and one depth attachment; mesh upload and prepass work are separate from the final FrameBudget. The final composition additionally consumes one target pass and its color texture byte allowance.
Implementations§
Source§impl ThreeDRenderLimits
impl ThreeDRenderLimits
Sourcepub const fn new(
max_cuboids: usize,
max_triangles: usize,
max_target_pixels: u64,
) -> Self
pub const fn new( max_cuboids: usize, max_triangles: usize, max_target_pixels: u64, ) -> Self
Sets exact inclusive object, surface-triangle, and physical-pixel caps.
Sourcepub const fn max_cuboids(self) -> usize
pub const fn max_cuboids(self) -> usize
Returns the maximum visible cuboid count and retained scene slot count.
Sourcepub const fn max_triangles(self) -> usize
pub const fn max_triangles(self) -> usize
Returns the maximum submitted surface triangle count.
Sourcepub const fn max_target_pixels(self) -> u64
pub const fn max_target_pixels(self) -> u64
Returns the maximum physical width times height of the depth target.
Sourcepub const fn with_mesh_limits(
self,
max_meshes: usize,
max_source_bytes: usize,
) -> Self
pub const fn with_mesh_limits( self, max_meshes: usize, max_source_bytes: usize, ) -> Self
Enables custom meshes with inclusive instance and CPU-source caps.
Source capacities are conservatively charged once per visible instance, even when instances share an asset. Triangle limits include both cuboids and custom meshes. Hidden/disabled meshes consume none of these limits. Engine’s additional finite GPU/upload/scene-memory limits still apply.
Sourcepub const fn max_meshes(self) -> usize
pub const fn max_meshes(self) -> usize
Returns the maximum visible custom-mesh instance count.
Sourcepub const fn max_mesh_source_bytes(self) -> usize
pub const fn max_mesh_source_bytes(self) -> usize
Returns the summed per-instance topology-capacity allowance.
Sourcepub const fn with_texture_limits(
self,
max_source_bytes: usize,
max_gpu_bytes: usize,
) -> Self
pub const fn with_texture_limits( self, max_source_bytes: usize, max_gpu_bytes: usize, ) -> Self
Enables textures with inclusive base-source and complete-mip texel caps. Both are conservatively charged per visible instance, including shared images. Engine additionally bounds its CPU mip storage, GPU resources and transient updates; these caps do not claim to measure driver allocations.
Sourcepub const fn max_texture_source_bytes(self) -> usize
pub const fn max_texture_source_bytes(self) -> usize
Returns the per-visible-instance summed base-pixel capacity allowance.
Sourcepub const fn max_texture_gpu_bytes(self) -> usize
pub const fn max_texture_gpu_bytes(self) -> usize
Returns the per-visible-instance summed nominal full-mip texel allowance.
Trait Implementations§
Source§impl Clone for ThreeDRenderLimits
impl Clone for ThreeDRenderLimits
impl Copy for ThreeDRenderLimits
Source§impl Debug for ThreeDRenderLimits
impl Debug for ThreeDRenderLimits
Source§impl Default for ThreeDRenderLimits
impl Default for ThreeDRenderLimits
impl Eq for ThreeDRenderLimits
Source§impl PartialEq for ThreeDRenderLimits
impl PartialEq for ThreeDRenderLimits
impl StructuralPartialEq for ThreeDRenderLimits
Auto Trait Implementations§
impl Forget for ThreeDRenderLimits
impl Freeze for ThreeDRenderLimits
impl Move for ThreeDRenderLimits
impl RefUnwindSafe for ThreeDRenderLimits
impl Send for ThreeDRenderLimits
impl Sync for ThreeDRenderLimits
impl Unpin for ThreeDRenderLimits
impl UnsafeUnpin for ThreeDRenderLimits
impl UnwindSafe for ThreeDRenderLimits
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
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,
impl<T> ConditionalSend for Twhere
T: Send,
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.