Ray Tracing, Apple Metal, Swift Programming, Gpu Rendering, Wwdc 2020.
answer to the texture outTexture.write(answer, pid); } Going through the code: Check the boundary of the thread grid with the image size grid, to avoid no work threads. To compute the ratio we get the denominators from the CPU. The same uniforms values that we used in RayTracing3 on the CPU side