Structs

Golden ratio constant.

Functions

colour 🔒

Determine the colour of a ray-surface collision. Record the data.

Calculate the lighting factor. Zero indicates darkness. Unity indicates fully illuminated.

main 🔒

Calculate the occlusion experienced over a distance along ray. Zero indicates full occlusion. Unity indicates full view.

Sample points within a circle using the golden ratio.

Sample points on a hemisphere’s surface using the golden ratio.

Sample points on a sphere’s surface using the golden ratio.

sample 🔒

Sample the scene.

Calculate the shadowing factor. Zero completely enshrouded. Unity no shadows.

sky_colour 🔒

Determine the colour of the sky. Record the data.