To simplify the process, new features were added to graphics cards, including the ability to modify their rendering pipelines using vertex and pixel shaders.
In the beginning, vertex and pixel shaders were programmed at a very low level with only the assembly language of the graphics processing unit.
Although using the assembly language gave the programmer complete control over code and flexibility, it was fairly hard to use.
A portable, higher level language for programming the GPU was needed, so Cg was created to overcome these problems and make shader development easier.
[9] Cg supports some of the newer profiles up to Shader Model 5.0 as well as translation to glsl or hlsl.
This allows the runtime to compile the shader using the latest optimizations available for hardware that the program is currently executing on.
To avoid exposing the source code of the shader, and still maintain some of the hardware specific optimizations, the concept of profiles was developed.
It was deprecated in favor of the open-source LLVM-based DXC (DirectXShaderCompiler) with support for newer HLSL features.
Support for SPIR-V means that the shaders can be cross-platform, no longer limiting them to a DirectX stack.
Shaders written in ReshadeFX are compiled to OpenGL, DX, or Vulkan and injected into games to act as post-processing filters.