Skip to content

ashader

Lubos Lenco edited this page Dec 29, 2024 · 3 revisions

ashader

Converts a .glsl like source code into a graphics API specific format. This includes .hlsl (afterwards converted into a d3d11 / d3d12 bytecode), .msl (metal shading language) for Metal or .spirv for Vulkan.

The shader source code is written in GLSL with a few exceptions:

  • To multiply matrices, use the mul function: A * B -> mul(B, A)

  • Use atan2 function for two value arctangent: atan(x, y) -> atan2(y, x)

Clone this wiki locally