Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ShaderBytecode Class

    Namespace: Stride.Shaders
    Assembly: Stride.Shaders.dll

    The bytecode of an effect.

    System.Object → ShaderBytecode
    Derived from ShaderBytecode:

    [DataContract]
    public class ShaderBytecode
    Name Description
    Constructors
    ShaderBytecode()

    Initializes a new instance of the ShaderBytecode class.

    ShaderBytecode(ObjectId, Byte[])

    Initializes a new instance of the ShaderBytecode class.

    Fields
    Stage

    The stage of this Bytecode.

    Properties
    Data

    Gets the shader data that should be used to create the .

    Id

    Hash of the Data.

    Methods
    Clone()

    Shallow clones this instance.

    GetDataAsString()

    Gets the data as a string.

    Operators
    Implicit(ShaderBytecode to Byte[])

    Performs an implicit conversion from ShaderBytecode to System.Byte.

    | Improve this Doc View Source

    Constructors


    ShaderBytecode()

    Initializes a new instance of the ShaderBytecode class.

    public ShaderBytecode()

    ShaderBytecode(ObjectId, Byte[])

    Initializes a new instance of the ShaderBytecode class.

    public ShaderBytecode(ObjectId id, byte[] data)
    Parameters
    Type Name Description
    ObjectId id
    System.Byte[] data

    The data.

    | Improve this Doc View Source

    Fields


    Stage

    The stage of this Bytecode.

    public ShaderStage Stage
    Field Value
    Type Description
    ShaderStage
    | Improve this Doc View Source

    Properties


    Data

    Gets the shader data that should be used to create the .

    public byte[] Data { get; set; }
    Property Value
    Type Description
    System.Byte[]

    The shader data.


    Id

    Hash of the Data.

    public ObjectId Id { get; set; }
    Property Value
    Type Description
    ObjectId
    | Improve this Doc View Source

    Methods


    Clone()

    Shallow clones this instance.

    public ShaderBytecode Clone()
    Returns
    Type Description
    ShaderBytecode

    ShaderBytecode.


    GetDataAsString()

    Gets the data as a string.

    public string GetDataAsString()
    Returns
    Type Description
    System.String

    System.String.

    | Improve this Doc View Source

    Operators


    Implicit(ShaderBytecode to Byte[])

    Performs an implicit conversion from ShaderBytecode to System.Byte.

    public static implicit operator byte[](ShaderBytecode shaderBytecode)
    Parameters
    Type Name Description
    ShaderBytecode shaderBytecode

    The shader bytecode.

    Returns
    Type Description
    System.Byte[]

    The result of the conversion.


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation