README.md aktualisiert

This commit is contained in:
Turingon 2024-03-04 21:53:51 +00:00
parent 971bfc6394
commit d167c2074e

View file

@ -81,7 +81,7 @@ A diffuse object is any object that is not emitting light, takes on the colours
I generated random reflection vectors and got the following (this is the first time a shadow can be observed, left one is mine, right one from the book - note the stripe is probably a consequence of fast inverse square and of using 32-bit floats instead of 64-bit ones):
<img src="https://media.discordapp.net/attachments/929667122404155445/1212496739668598875/image.png?ex=65f20c95&is=65df9795&hm=d8db91eee8a0f62250c1c64628e7d214aa39c504b94ffa13a554335addfb0905&=&format=webp&quality=lossless&width=1148&height=655" width="480"/><img src="https://raytracing.github.io/images/img-1.07-first-diffuse.png" width="480"/>
<img src="https://preview.redd.it/some-projects-ive-been-working-on-3-v0-xondbx2r1emc1.png?width=1080&crop=smart&auto=webp&s=2cd684d53024c5756c7459e3762723faefb00182" width="480"/><img src="https://raytracing.github.io/images/img-1.07-first-diffuse.png" width="480"/>
A problem that occurs on this image is the **shadow acne** problem: A ray will attempt to accurately calculate the intersection point when it intersects with a surface. Unfortunately for us, this calculation is susceptible to floating point rounding errors which can cause the intersection point to be ever so slightly off. This means that the origin of the next ray, the ray that is randomly scattered off of the surface, is unlikely to be perfectly flush with the surface. It might be just above the surface. It might be just below the surface. If the ray's origin is just below the surface then it could intersect with that surface again. Which means that it will find the nearest surface at t=0.00000001 or whatever floating point approximation the hit function gives us. The simple fix yields this image:
@ -93,7 +93,7 @@ To make the shadows look more realistic, I had to implement the Lambertian refle
The last issue left in the chapter is the darkness of the image and it's due to some strange linear-gamma space conversion? I don't quite understand how that works, but by taking the square root of the colour values we get the right brightness. Nice
<img src="https://media.discordapp.net/attachments/874752364698013736/1212767017711697950/image.png?ex=65f3084d&is=65e0934d&hm=b8eabd56619cff0984e361c4917b9f63b7d7e3a76e28dbc666c7d91f9f6331de&=&format=webp&quality=lossless&width=720&height=405" width="480"/>
<img src="https://preview.redd.it/some-projects-ive-been-working-on-3-v0-a4a1203r1emc1.png?width=914&format=png&auto=webp&s=f14960bbbb7bc99d9209b6a84c1a9a7c99cd4c9f" width="480"/>
### Chapter 8: The Materials struct and Metals