pub enum ShaderComplexity {
Unlit,
SimpleLit,
FullPBR,
}Expand description
Shader complexity levels for resource budgeting and GORNA negotiation.
This enum represents the relative computational cost of different shader configurations, allowing the rendering system to communicate workload estimates to the resource allocation system.
Variants§
Unlit
No lighting calculations, vertex colors only. Fastest rendering path.
SimpleLit
Basic Lambertian diffuse + simple specular. Moderate performance cost.
FullPBR
Full PBR with Cook-Torrance BRDF. Highest quality, highest cost.
Implementations§
Source§impl ShaderComplexity
impl ShaderComplexity
Sourcepub fn cost_multiplier(&self) -> f32
pub fn cost_multiplier(&self) -> f32
Returns a cost multiplier for the given complexity level.
This multiplier is applied to the base rendering cost to estimate the total GPU workload for different shader configurations.
Trait Implementations§
Source§impl Clone for ShaderComplexity
impl Clone for ShaderComplexity
Source§fn clone(&self) -> ShaderComplexity
fn clone(&self) -> ShaderComplexity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShaderComplexity
impl Debug for ShaderComplexity
Source§impl Default for ShaderComplexity
impl Default for ShaderComplexity
Source§fn default() -> ShaderComplexity
fn default() -> ShaderComplexity
Returns the “default value” for a type. Read more
Source§impl Ord for ShaderComplexity
impl Ord for ShaderComplexity
Source§fn cmp(&self, other: &ShaderComplexity) -> Ordering
fn cmp(&self, other: &ShaderComplexity) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ShaderComplexity
impl PartialEq for ShaderComplexity
Source§fn eq(&self, other: &ShaderComplexity) -> bool
fn eq(&self, other: &ShaderComplexity) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ShaderComplexity
impl PartialOrd for ShaderComplexity
impl Copy for ShaderComplexity
impl Eq for ShaderComplexity
impl StructuralPartialEq for ShaderComplexity
Auto Trait Implementations§
impl Freeze for ShaderComplexity
impl RefUnwindSafe for ShaderComplexity
impl Send for ShaderComplexity
impl Sync for ShaderComplexity
impl Unpin for ShaderComplexity
impl UnsafeUnpin for ShaderComplexity
impl UnwindSafe for ShaderComplexity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.