#[repr(C)]
pub enum ShaderKind {
Show 30 variants Vertex, Fragment, Compute, Geometry, TessControl, TessEvaluation, InferFromSource, DefaultVertex, DefaultFragment, DefaultCompute, DefaultGeometry, DefaultTessControl, DefaultTessEvaluation, SpirvAssembly, RayGeneration, AnyHit, ClosestHit, Miss, Intersection, Callable, DefaultRayGeneration, DefaultAnyHit, DefaultClosestHit, DefaultMiss, DefaultIntersection, DefaultCallable, Task, Mesh, DefaultTask, DefaultMesh,
}
Expand description

Shader kind.

  • The <stage> enumerants are forced shader kinds, which force the compiler to compile the source code as the specified kind of shader, regardless of #pragma directives in the source code.
  • The Default<stage> enumerants are default shader kinds, which allow the compiler to fall back to compile the source code as the specified kind of shader when #pragma is not found in the source code.

Variants

Vertex

Fragment

Compute

Geometry

TessControl

TessEvaluation

InferFromSource

Deduce the shader kind from #pragma directives in the source code.

Compiler will emit error if #pragma annotation is not found.

DefaultVertex

DefaultFragment

DefaultCompute

DefaultGeometry

DefaultTessControl

DefaultTessEvaluation

SpirvAssembly

RayGeneration

AnyHit

ClosestHit

Miss

Intersection

Callable

DefaultRayGeneration

DefaultAnyHit

DefaultClosestHit

DefaultMiss

DefaultIntersection

DefaultCallable

Task

Mesh

DefaultTask

DefaultMesh

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.