RayMarching#1

Preface

Using OpenGL, practicing ray marching.

Source From

Summary

  • ShaderToy controls only a fragment shader

Nomenclature

ShaderToy

  • fragCoord: Current fragment(pixel) position
  • iResolution: The size of the frame. Equal to windows/viewport
  • Signed Distance Functions(SDF): When passed the coordinates of a point in space, return the shortest distance between that point and some surface.
  • Radians: Convert a quantity in degrees to radians. 2π rad = 360∘ 1rad ≒ 57.3∘
  • Normalize: Calculates the unit vector in the same direction as the original vector. Divice vector by its maginitude. Therefore, new length will be 1.