Ray-Based Rendering Generic Concepts and Terminologies

less than 1 minute read

Published:

(work in progress…)

Shaders

Unlike the rasterization pipeline, the ray tracing-based algorithms has five types of shaders (generally). The computational expensive pixel shader in rasterization could be equivalent of closest-hit shader. The ray tracing-based pipeline’s shaders are more or less 3D graphics API agnostic. The five shaders are as follows:

  1. The ray generation shader defines how the ray tracing should start. It runs once per algorithm (per pass)
  2. The Intersection shader/s define ray-object (aka. geometry) intersection. The shader is reusable
  3. The miss shader/s define the behavior when the ray miss hitting any geometry in the scene
  4. The closest hit shader/s run once per ray and shade the final hits
  5. The any-hit shader/s run once per hit and determine the transparency

The miss, closest hit, and any hit define the behavior of ray/s and may behave differently between primary, shadow, and indirect rays.