What is Renderer? How it is different from a shader?

For Photorealism which one is more important?

  • 1
    \$\begingroup\$ This post appears to be two distinct questions. Please only include one question per post. \$\endgroup\$ – S. Tarık Çetin Oct 24 '17 at 14:51

Shaders and renderers are two different things. A renderer is simply a piece of code written on top of a rendering API (such as OpenGL or DirectX) and it handles the model rendering (hence the name).

A shader is also a piece of code, but it runs on the GPU. It's optimized to work on hundreds of threads at once and it's usually used to figure out the position of a vertex (a point of a 3d model) relative to the camera (vertex shader) or to figure out the color of a certain pixel (fragment shader).

Your third question makes no sense currently. None of them are required to achieve photorealism. You can make photorealistic images with just shaders (like here) and you can also achieve it without using a shader, in fact, ray tracing is the current standard in movie making and it doesn't have to involve the usage of shaders.

| improve this answer | |
  • \$\begingroup\$ I would argue that even the ShaderToy example has a very simple renderer in play, providing the viewport and quad geometry with UV coordinates to be shaded, and piping in variables like texture sources or user input. ;) And a raytracing renderer is still a renderer, it's just a fundamentally different way of implementing responsibility for generating an image. \$\endgroup\$ – DMGregory Oct 24 '17 at 15:47
  • \$\begingroup\$ @DMGregory 1.) Fair point 2.) Thanks for mentioning, that should've been the renderer only one, I'll fix it \$\endgroup\$ – Bálint Oct 24 '17 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy