« on: June 08, 2016, 04:42:16 PM »
It's 2016 and we're still stuck with various shading languages - the current contenders being HLSL for Direct3D, and GLSL for OpenGL and as the "default" frontend language to generate SPIR-V for Vulkan. SPIR-V may become eventually the IL of choice for everything, but that'll take a while, so right now, you need to convert HLSL to GLSL or vice versa if you want to target both APIs.
I won't dig into the various cross-compilers today - that's a huge topic - and focus on the language similarities instead. Did you ever ask yourself how your SV_Position input is called in GLSL? Then this post is for you!
Another article that can be useful: How to Compute the Position and Normal in the Vertex Shader in OpenGL (GLSL) and Direct3D (HLSL)