What's the advantage of re-implementing the GPU programming model (shaders) instead of just writing regular C++ code? I would think that would just introduce overhead for no reason.
Shaders were originally a production rendering concept introduced by Pixar's RenderMan in the 80s. It only became a thing in GPUs much later.
Programmable shading is really more of a design pattern in graphics renderers.
Comments
What's the advantage of re-implementing the GPU programming model (shaders) instead of just writing regular C++ code? I would think that would just introduce overhead for no reason.
Shaders were originally a production rendering concept introduced by Pixar's RenderMan in the 80s. It only became a thing in GPUs much later. Programmable shading is really more of a design pattern in graphics renderers.
There's no performance reason really, the motivation behind it was flexibility for trying out new ideas and to decouple logic from the rasterizer