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 · 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 · 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§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 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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().