Ray Tracing, Apple Metal, Swift Programming, Gpu Rendering, Wwdc 2020.
is to save the image to file. Most of the code was copied from the Internet, the references are in the code. On the GPU side: kernel void kernal_ray(texture2d<half, access::write> outTexture [[texture(0)]], uint2 pid [[thread_position_in_grid]]){ //1 Check if the pixel is within the bounds of the