Skip to main content

Module shader_translate

Module shader_translate 

Source
Expand description

Shader translation between GLSL, WGSL, SPIRV (text), HLSL, and MSL. Includes reflection (extracting bindings, inputs, outputs) and validation.

Structs§

ReflectedBinding
A reflected binding.
ShaderError
A located shader error / warning.
ShaderReflection
Reflected information about a shader module.
TranslateError
Translation error.

Enums§

GlslToken
Severity
Severity of a shader diagnostic.
ShaderLanguage
WgslToken

Functions§

glsl_to_spirv_text
Produce a SPIR-V text representation from GLSL source. This is a simplified textual output, not actual binary SPIR-V.
glsl_to_wgsl
Translate a GLSL shader to WGSL.
reflect_glsl
Reflect a GLSL shader.
reflect_wgsl
Reflect a WGSL shader.
validate_shader
Validate a shader source in the given language.
wgsl_to_glsl
Translate a simple WGSL shader back to GLSL 330 core.