If you want to learn more, the best raytracing book is <a href="http:&#x2F;&#x2F;www.pbrt.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.pbrt.org&#x2F;</a> which goes into immense details about various techniques and won an Academy Award. The renderer described in the book is also available online: <a href="https:&#x2F;&#x2F;github.com&#x2F;mmp&#x2F;pbrt-v3" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mmp&#x2F;pbrt-v3</a>