Ray Tracing, Apple Metal, Swift Programming, Gpu Rendering, Wwdc 2020.
pointAtParameter(parameter t: Float) -> float3 { return origin + t * direction } init(origin: float3 = float3(0,0,0), direction: float3 = float3(0,0,0)) { self.origin = origin self.direction = direction } } Starting with iOS 14 and Big Sur Apple’s ray struct will be available on A13 processors. In