pub struct RendererSettings {
pub path: RenderPath,
pub vsync: bool,
pub anisotropy_clamp: u16,
}Expand description
Runtime rendering configuration.
Controls pipeline topology, presentation mode, and quality knobs that
can be changed at any time via [Renderer::update_settings]. The
renderer performs an internal diff and applies only the changes that
actually differ from the current state.
§Example
use myth::render::{RendererSettings, RenderPath};
// High-performance gaming setup
let game = RendererSettings {
path: RenderPath::HighFidelity,
vsync: false,
..Default::default()
};
// Battery-friendly mobile setup
let mobile = RendererSettings {
path: RenderPath::BasicForward,
vsync: true,
..Default::default()
};Fields§
§path: RenderPathThe rendering pipeline topology.
Determines which passes are assembled into the frame graph and which
post-processing effects are available. See RenderPath.
vsync: boolEnable vertical synchronization (VSync).
When true, the frame rate is capped to the display refresh rate,
reducing screen tearing and power consumption.
When false, the frame rate is uncapped, which may cause tearing
but reduces input latency.
anisotropy_clamp: u16Global anisotropic filtering level for default texture samplers.
Higher values produce sharper textures at oblique angles at a modest GPU cost. Common values: 1 (disabled), 4, 8, 16.
Trait Implementations§
Source§impl Clone for RendererSettings
impl Clone for RendererSettings
Source§fn clone(&self) -> RendererSettings
fn clone(&self) -> RendererSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RendererSettings
impl Debug for RendererSettings
Source§impl Default for RendererSettings
impl Default for RendererSettings
Source§fn default() -> RendererSettings
fn default() -> RendererSettings
Source§impl PartialEq for RendererSettings
impl PartialEq for RendererSettings
impl Eq for RendererSettings
impl StructuralPartialEq for RendererSettings
Auto Trait Implementations§
impl Freeze for RendererSettings
impl RefUnwindSafe for RendererSettings
impl Send for RendererSettings
impl Sync for RendererSettings
impl Unpin for RendererSettings
impl UnsafeUnpin for RendererSettings
impl UnwindSafe for RendererSettings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<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<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>
ReadEndian::read_from_little_endian().