Search Results for

    Show / Hide Table of Contents

    Class WGPUShader

    This class represents a native shader object on WebGPU.

    Inheritance
    object
    GraphicsResource
    Shader
    WGPUShader
    Inherited Members
    Shader.Description
    Shader.GetHashCode()
    GraphicsResource.Context
    GraphicsResource.Disposed
    GraphicsResource.Dispose()
    GraphicsResource.Dispose(bool)
    Namespace: Evergine.WebGPU
    Assembly: Evergine.WebGPU.dll
    Syntax
    public class WGPUShader : Shader

    Constructors

    WGPUShader(GraphicsContext, ref ShaderDescription)

    Initializes a new instance of the WGPUShader class.

    Declaration
    public WGPUShader(GraphicsContext context, ref ShaderDescription description)
    Parameters
    Type Name Description
    GraphicsContext context

    The graphics context.

    ShaderDescription description

    The shader description.

    Fields

    ShaderModule

    The WebGPU shader module.

    Declaration
    public WGPUShaderModule ShaderModule
    Field Value
    Type Description
    WGPUShaderModule

    Properties

    Name

    Gets or sets a string identifying this instance. Can be used in graphics debugger tools.

    Declaration
    public override string Name { get; set; }
    Property Value
    Type Description
    string
    Overrides
    Shader.Name

    NativePointer

    Gets the native pointer.

    Declaration
    public override nint NativePointer { get; }
    Property Value
    Type Description
    nint
    Overrides
    GraphicsResource.NativePointer

    Methods

    Destroy()

    Destroy graphics native resources.

    Declaration
    protected override void Destroy()
    Overrides
    GraphicsResource.Destroy()

    ShaderCompile(string, string, ShaderStages, CompilerParameters)

    Converts the shader source into bytecode.

    Declaration
    public static CompilationResult ShaderCompile(string shaderSource, string entryPoint, ShaderStages stage, CompilerParameters parameters)
    Parameters
    Type Name Description
    string shaderSource

    The shader source text.

    string entryPoint

    The entrypoint function name.

    ShaderStages stage

    The shader stage, ShaderStages.

    CompilerParameters parameters

    The compiler parameters.

    Returns
    Type Description
    CompilationResult

    The shader bytecodes.

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX