pub struct RendererOptions {
pub msaa_samples: u32,
pub depth_stencil_format: Option<TextureFormat>,
pub dithering: bool,
pub predictable_texture_filtering: bool,
}Expand description
Ways to configure Renderer during creation.
Fields§
§msaa_samples: u32Set the level of the multisampling anti-aliasing (MSAA).
Must be a power-of-two. Higher = more smooth 3D.
A value of 0 or 1 turns it off (default).
egui already performs anti-aliasing via “feathering”
(controlled by egui::epaint::TessellationOptions),
but if you are embedding 3D in egui you may want to turn on multisampling.
depth_stencil_format: Option<TextureFormat>What format to use for the depth and stencil buffers,
e.g. wgpu::TextureFormat::Depth32FloatStencil8.
egui doesn’t need depth/stencil, so the default value is None (no depth or stancil buffers).
dithering: boolControls whether to apply dithering to minimize banding artifacts.
Dithering assumes an sRGB output and thus will apply noise to any input value that lies between two 8bit values after applying the sRGB OETF function, i.e. if it’s not a whole 8bit value in “gamma space”. This means that only inputs from texture interpolation and vertex colors should be affected in practice.
Defaults to true.
predictable_texture_filtering: boolPerform texture filtering in software?
This is useful when you want predictable rendering across different hardware, e.g. for kittest snapshots.
Default is false.
Implementations§
Source§impl RendererOptions
impl RendererOptions
Sourcepub const PREDICTABLE: Self
pub const PREDICTABLE: Self
Set options that produce the most predicatable output.
Useful for image snapshot tests.
Trait Implementations§
Source§impl Clone for RendererOptions
impl Clone for RendererOptions
Source§fn clone(&self) -> RendererOptions
fn clone(&self) -> RendererOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more