GLSL shaders

Monogame right now uses HLSL shaders for every platform, but when compiling for non-DirectX it is automatically converted into GLSL by a parser.

I can see why you would want to learn GLSL over HLSL, but they are so similar that you don’t really miss out when choosing the one over the other. Java and C# are relatively different in comparison.

It mostly comes down to different naming conventions (for example to get the fraction of a float you use frac() in HLSL and fract() in glsl, you use vec3 in glsl and float3 in hlsl etc.) and the way some buffers are set up, but the way they work when it really comes down to it is basically the same.

2 Likes