Difference between Spir-v, GLSL and HLSL

I’m trying to find out the difference between all the shader langage. I’m working on a game in c++ with Vulkan currently witch mean (if i’ve read correctly) that every shader i present to Vulkan must be in spir-v extension.

But i’ve seen sometimes the uses of this library : GitHub - KhronosGroup/SPIRV-Cross: SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages. Which can translates spir-v to other langage if i understand well (GLSL, HLSL or MSL), is it something useful when i try to make a game? Not to work on shader on different platform.

Or maybe i need these differents format to use them or different platform? (which doesn’t seem right as vulkan look for spir-v). Nevertheless, i saw that there was a tool MoltenVK to use the shader on Mac. Which mean mac doesn’t support correctly vulkan? So what are the pro and cons of these langage? (I mean when creating a game, the user isn’t supposed to modify the shader)

I hope my question isn’t too fuzzy.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.