Skip to main content

NodeProgram

Struct NodeProgram 

Source
pub struct NodeProgram {
    pub vertex_wgsl: String,
    pub fragment_wgsl: String,
    pub attributes: Vec<AttributeSlot>,
    pub groups: Vec<Vec<BindingDesc>>,
    pub subgroups: bool,
    /* private fields */
}
Expand description

The built vertex and fragment shaders and everything their pipeline needs.

Fields§

§vertex_wgsl: String

The generated @vertex entry point’s WGSL source.

§fragment_wgsl: String

The generated @fragment entry point’s WGSL source.

§attributes: Vec<AttributeSlot>

Vertex attributes in @location order.

§groups: Vec<Vec<BindingDesc>>

Bind groups in @group order.

§subgroups: bool

A stage — in practice the fragment stage, since a subgroup function in the vertex stage is an error — reads a subgroup builtin or calls a subgroup function, so its WGSL has enable subgroups; and the material needs a device with wgpu::Features::SUBGROUP (WGSLNodeBuilder.enableSubGroups()). See docs/nodes.md §84.3.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.