Shader Model and GLSL versions

When reading articles about graphics programming you come alone the term ‘Shader Model’ and version numbers for GLSL, OpenGL and Direct3D (depending on the API used in the article). While the described algorithms (nearly always) can be implemented in the ‘other’ API as well the different versioning schemes can be confusing – what OpenGL version and GLSL version do I need to implement this ‘Shader Model 4.0′ technique?

Note that you can’t always find an exact match for each version in the other API so take this chart with a grain of salt, its intension is to give you a rough overview of which API versions have a similar enough feature set to implement similar algorithms.

OpenGL

GLSL

Direct3D

Shader Model

2.1

120

9.0

2.0

3.3

330

10.0

4.0

4.2

420

11.0

5.0

The Shaders itself are also called differently (but serve the same purpose):