How are HLSL converted to GLSL when exporting to Mac?

For windows users the editor uses D3D11 as default, and we write our shaders on modified version of DirectX’s High-Lever Shader Language/HLSL. Then when I export on Mac using OpenGL that means that those HLSL we write are converted automatically to GLSL? How is that possible. This whole cross-platform thing with DirectX, OpenGL, Vulkan, WebGL seems impossible to me

Yes.

See:

https://github.com/Unity-Technologies/HLSLcc

1 Like