Search Results for

    Show / Hide Table of Contents

    Class HLSLTranslator

    Main Translator class HLSL to SPIRV, GLSL, ESSL, MSL.

    Inheritance
    object
    HLSLTranslator
    Namespace: Evergine.HLSLEverywhere
    Assembly: Evergine.HLSLEverywhere.dll
    Syntax
    public static class HLSLTranslator

    Methods

    DisassemblySPIRV(byte[])

    Disassemble SPIRV.

    Declaration
    public static string DisassemblySPIRV(byte[] bytecode)
    Parameters
    Type Name Description
    byte[] bytecode

    SPIRV ByteCode.

    Returns
    Type Description
    string

    Translation Result object.

    HLSLTo(string, ShaderStages, GraphicsProfile, string, ShadingLanguage, int)

    Translate HLSL to other languages (GLSL, ESSL, SPIRV, Metal).

    Declaration
    public static string HLSLTo(string hlslSource, ShaderStages stage, GraphicsProfile profile, string entryPoint, ShadingLanguage language, int version = 450)
    Parameters
    Type Name Description
    string hlslSource

    HLSL source.

    ShaderStages stage

    Shader stage.

    GraphicsProfile profile

    Compile profile.

    string entryPoint

    Shader entryPoint.

    ShadingLanguage language

    Target language.

    int version

    OpenGL/ES version. Default value 460.

    Returns
    Type Description
    string

    Translate string.

    HLSLToBinarySPIRV(string, ShaderStages, GraphicsProfile, string)

    Translate HLSL to SPIRV bytecode.

    Declaration
    public static byte[] HLSLToBinarySPIRV(string hlslSource, ShaderStages stage, GraphicsProfile profile, string entryPoint)
    Parameters
    Type Name Description
    string hlslSource

    HLSL source.

    ShaderStages stage

    Shader stage.

    GraphicsProfile profile

    Graphics Profile.

    string entryPoint

    Shader Entrypoint.

    Returns
    Type Description
    byte[]

    SPIRV bytecode.

    HLSLToWGSL(string, ShaderStages, GraphicsProfile, string)

    Translate HLSL to WGSL.

    Declaration
    public static string HLSLToWGSL(string hlslSource, ShaderStages stage, GraphicsProfile profile, string entryPoint)
    Parameters
    Type Name Description
    string hlslSource

    HLSL source.

    ShaderStages stage

    Shader stage.

    GraphicsProfile profile

    Graphics Profile.

    string entryPoint

    Shader Entrypoint.

    Returns
    Type Description
    string

    WGSL translated code.

    In this article
    Back to top
    Generated by DocFX