Ray Tracing, Apple Metal, Swift Programming, Gpu Rendering, Wwdc 2020.
by one color while the other is colored by another. Here is the Lighting code: func HemisphericLighting(ray r : Ray) -> float3 { //1 create Unit Vector to compute the intensity let unitDirection : float3 = normalize(r.direction) //2 shifting and scaling t in [0.0, 1.0] let t = 0.5*(unitDirection.y