pub struct ShaderSettings {
pub topology: PrimitiveTopology,
pub strip_index_format: Option<IndexFormat>,
pub front_face: FrontFace,
pub cull_mode: Option<Face>,
pub polygon_mode: PolygonMode,
pub clamp_depth: bool,
pub conservative: bool,
pub count: u32,
pub mask: u64,
pub alpha_to_coverage_enabled: bool,
}Expand description
These definitions are taken from wgpu API docs
Fields§
§topology: PrimitiveTopologyThe primitive topology used to interpret vertices
strip_index_format: Option<IndexFormat>When drawing strip topologies with indices, this is the required format for the index buffer. This has no effect on non-indexed or non-strip draws.
front_face: FrontFaceThe face to consider the front for the purpose of culling and stencil operations.
cull_mode: Option<Face>The face culling mode
polygon_mode: PolygonModeControls the way each polygon is rasterized. Can be
either Fill (default), Line or Point
Setting this to something other than Fill requires
NON_FILL_POLYGON_MODE feature to be enabled
clamp_depth: boolIf set to true, the polygon depth is clamped to 0-1 range instead of being clipped.
Enabling this requires the DEPTH_CLAMPING feature
to be enabled
conservative: boolIf set to true, the primitives are rendered with conservative overestimation. I.e. any rastered pixel touched by it is filled. Only valid for PolygonMode::Fill!
Enabling this requires CONSERVATIVE_RASTERIZATION
features to be enabled.
count: u32The number of samples calculated per pixel (for MSAA).
For non-multisampled textures, this should be 1
mask: u64Bitmask that restricts the samples of a pixel modified
by this pipeline. All samples can be enabled using the
value !0
alpha_to_coverage_enabled: boolWhen enabled, produces another sample mask per pixel based on the alpha output value, that is ANDead with the sample_mask and the primitive coverage to restrict the set of samples affected by a primitive. The implicit mask produced for alpha of zero is guaranteed to be zero, and for alpha of one is guaranteed to be all 1-s.
Trait Implementations§
Source§impl Clone for ShaderSettings
impl Clone for ShaderSettings
Source§fn clone(&self) -> ShaderSettings
fn clone(&self) -> ShaderSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShaderSettings
impl Debug for ShaderSettings
Source§impl Default for ShaderSettings
impl Default for ShaderSettings
Source§fn default() -> ShaderSettings
fn default() -> ShaderSettings
impl Copy for ShaderSettings
impl Send for ShaderSettings
impl Sync for ShaderSettings
Auto Trait Implementations§
impl Freeze for ShaderSettings
impl RefUnwindSafe for ShaderSettings
impl Unpin for ShaderSettings
impl UnwindSafe for ShaderSettings
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<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> 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> ⓘ
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> ⓘ
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 moreSource§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>
ReadEndian::read_from_little_endian().