and more graphics APIs become available, developers face the problem of porting shaders from one shading languages to another. A few approaches are used: Manual switching using C preprocessor (CPP) statements. Cg/HLSL, GLSL, and MSL all implement CPP macros, so it is possible to wrap all the different operations into a common interface. Valve's Source 2 and NVIDIA's FXAA 3.11 do this. Translate one language to the other. DirectX bytecode partially can be converted to GLSL via HLSLcc, and several tools for converting GLSL to HLSL such as ANGLE and HLSL2GLSL exist. Define a different intermediate language. SPIR-V is designed partially for this purpose. It can be generated from HLSL or GLSL, and be decompiled into HLSL, GLSL, or MSL. References Notes Previous vertex shading languages (in no particular order) for OpenGL include EXT_vertex_shader, NV_vertex_program, the aforementioned ARB_vertex_program, NV_vertex_program2 and NV_vertex_program3. For fragment shading nvparse is possibly the first shading language featuring high-level abstraction based on NV_register_combiners, NV_register_combiners2 for pixel math and NV_texture_shader, NV_texture_shader2 and NV_texture_shader3 for texture lookups. ATI_fragment_shader did not even provide a "string oriented" parsing facility (although it has been later added by ATI_text_fragment_shader). ARB_fragment_program, has been very successful. NV_fragment_program and NV_fragment_program2 are actually similar although the latter provides much more advanced functionality in respect to others. Fx composer from NVIDIA home page, http://developer.nvidia.com/object/fx_composer_home.html Rudy Cortes and Saty Raghavachary: The RenderMan Shading Language Guide, Course Technology PTR, 1 edition (December 27, 2007), Programming language classification