pub struct Shader {
pub module: ShaderModule,
pub entry: Cow<'static, str>,
pub stage: ShaderStage,
}
Expand description
Shader module and entry point. Uniquely identifies shader for pipeline.
Fields§
§module: ShaderModule
Shader module created by Device
from source.
entry: Cow<'static, str>
Name of entry point.
stage: ShaderStage
Stage of this shader.
Implementations§
source§impl Shader
impl Shader
sourcepub fn with_main(module: ShaderModule, stage: ShaderStage) -> Self
pub fn with_main(module: ShaderModule, stage: ShaderStage) -> Self
Creates new shader from module using “main” entry point.
pub fn module(&self) -> &ShaderModule
pub fn entry(&self) -> &str
pub fn stage(&self) -> ShaderStage
Trait Implementations§
source§impl From<AnyHitShader> for Shader
impl From<AnyHitShader> for Shader
source§fn from(shader: AnyHitShader) -> Shader
fn from(shader: AnyHitShader) -> Shader
Converts to this type from the input type.
source§impl From<ClosestHitShader> for Shader
impl From<ClosestHitShader> for Shader
source§fn from(shader: ClosestHitShader) -> Shader
fn from(shader: ClosestHitShader) -> Shader
Converts to this type from the input type.
source§impl From<ComputeShader> for Shader
impl From<ComputeShader> for Shader
source§fn from(shader: ComputeShader) -> Shader
fn from(shader: ComputeShader) -> Shader
Converts to this type from the input type.
source§impl From<FragmentShader> for Shader
impl From<FragmentShader> for Shader
source§fn from(shader: FragmentShader) -> Shader
fn from(shader: FragmentShader) -> Shader
Converts to this type from the input type.
source§impl From<GeometryShader> for Shader
impl From<GeometryShader> for Shader
source§fn from(shader: GeometryShader) -> Shader
fn from(shader: GeometryShader) -> Shader
Converts to this type from the input type.
source§impl From<IntersectionShader> for Shader
impl From<IntersectionShader> for Shader
source§fn from(shader: IntersectionShader) -> Shader
fn from(shader: IntersectionShader) -> Shader
Converts to this type from the input type.
source§impl From<MissShader> for Shader
impl From<MissShader> for Shader
source§fn from(shader: MissShader) -> Shader
fn from(shader: MissShader) -> Shader
Converts to this type from the input type.
source§impl From<RaygenShader> for Shader
impl From<RaygenShader> for Shader
source§fn from(shader: RaygenShader) -> Shader
fn from(shader: RaygenShader) -> Shader
Converts to this type from the input type.
source§impl From<TessellationControlShader> for Shader
impl From<TessellationControlShader> for Shader
source§fn from(shader: TessellationControlShader) -> Shader
fn from(shader: TessellationControlShader) -> Shader
Converts to this type from the input type.
source§impl From<TessellationEvaluationShader> for Shader
impl From<TessellationEvaluationShader> for Shader
source§fn from(shader: TessellationEvaluationShader) -> Shader
fn from(shader: TessellationEvaluationShader) -> Shader
Converts to this type from the input type.
source§impl From<VertexShader> for Shader
impl From<VertexShader> for Shader
source§fn from(shader: VertexShader) -> Shader
fn from(shader: VertexShader) -> Shader
Converts to this type from the input type.
source§impl PartialEq<Shader> for Shader
impl PartialEq<Shader> for Shader
source§impl TryFrom<Shader> for AnyHitShader
impl TryFrom<Shader> for AnyHitShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.
source§impl TryFrom<Shader> for ClosestHitShader
impl TryFrom<Shader> for ClosestHitShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.
source§impl TryFrom<Shader> for ComputeShader
impl TryFrom<Shader> for ComputeShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.
source§impl TryFrom<Shader> for FragmentShader
impl TryFrom<Shader> for FragmentShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.
source§impl TryFrom<Shader> for GeometryShader
impl TryFrom<Shader> for GeometryShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.
source§impl TryFrom<Shader> for IntersectionShader
impl TryFrom<Shader> for IntersectionShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.
source§impl TryFrom<Shader> for MissShader
impl TryFrom<Shader> for MissShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.
source§impl TryFrom<Shader> for RaygenShader
impl TryFrom<Shader> for RaygenShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.
source§impl TryFrom<Shader> for TessellationControlShader
impl TryFrom<Shader> for TessellationControlShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.
source§impl TryFrom<Shader> for TessellationEvaluationShader
impl TryFrom<Shader> for TessellationEvaluationShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.
source§impl TryFrom<Shader> for VertexShader
impl TryFrom<Shader> for VertexShader
§type Error = WrongShaderStage
type Error = WrongShaderStage
The type returned in the event of a conversion error.