Ray-Triangle Intersections With Geometry Normals
| |
Output | Normalized z-buffer |
Here, everything except ray-box intersection has been implemented correctly, but the normals are not interpolated using the barycentric coordinates. I use the geometry normals, computed using vertex positions. This results in the so-called flat shading. Render time 0:00:25 (low-res teapot).
Interpolated Normals
| |
Output | Normalized z-buffer |
This is the same scene as above, but with interpolated normals. Render time 0:00:24 (still no bounding box intersection). The first thing that occurred to me after this render is that the shadows look off. It's easy to see why that is so, shadows are computed using the low-res geometry, no interpolation is involved when you query the light source with a shadow ray. The low-res geometry simply gives a low-res shadow, the exact same shadow as in the render without normal interpolation.