pub struct SceneShaderProgram { /* private fields */ }Expand description
Backend-independent compiled fragment program. Created by shader extensions; backend pipeline caches belong to the host renderer and its device.
Implementations§
Source§impl SceneShaderProgram
impl SceneShaderProgram
Sourcepub fn new(
wgsl: String,
metal: (String, String, String),
hlsl: (String, String, String),
) -> Self
pub fn new( wgsl: String, metal: (String, String, String), hlsl: (String, String, String), ) -> Self
Allocate a unique identity for validated backend sources.
Sourcepub fn new_with_output_encoding(
wgsl: String,
metal: (String, String, String),
hlsl: (String, String, String),
output_encoding: ShaderOutputEncoding,
) -> Self
pub fn new_with_output_encoding( wgsl: String, metal: (String, String, String), hlsl: (String, String, String), output_encoding: ShaderOutputEncoding, ) -> Self
Create an immutable program with explicit output meaning. Encoding is part of the unique program identity used by backend pipeline caches.
Sourcepub fn with_glyph_mask(self) -> Self
pub fn with_glyph_mask(self) -> Self
Declare that the validated program reads a grayscale glyph atlas at texture binding group 1/binding 0. Call before sharing the program.
Sourcepub fn with_path_mask(self) -> Self
pub fn with_path_mask(self) -> Self
Declare a host-provided native path coverage texture at group 1/binding 0.
Sourcepub fn uses_path_mask(&self) -> bool
pub fn uses_path_mask(&self) -> bool
Whether the host must rasterize retained path coverage before this draw.
Sourcepub fn uses_glyph_mask(&self) -> bool
pub fn uses_glyph_mask(&self) -> bool
Whether each instance requires a retained monochrome atlas tile.
Sourcepub fn output_encoding(&self) -> ShaderOutputEncoding
pub fn output_encoding(&self) -> ShaderOutputEncoding
Immutable output meaning; part of this program’s unique cache identity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SceneShaderProgram
impl RefUnwindSafe for SceneShaderProgram
impl Send for SceneShaderProgram
impl Sync for SceneShaderProgram
impl Unpin for SceneShaderProgram
impl UnsafeUnpin for SceneShaderProgram
impl UnwindSafe for SceneShaderProgram
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more