raytracing.github.io
raytracing.github.io copied to clipboard
Main Web Site (Online Books)
This goes back to #958, the `#endif` should appear at the bottom of the 2nd snippet. Being where it currently is makes it yield code that will not compile if...
The statement "Recall that the equation for a sphere centered at the origin of radius R is x2+y2+z2=R2." is fairly lacking because "why squared" is never answered (nor for that...
On macbook Pro M1, after arriving at the very end of chapter 3 in RayTracing In One Weekend, I get the error mentioned in the topic. My [repository](https://github.com/erikmartinessanches/RayTracing).
There's a number of things that for me, need to be cleared up: > ...For now we'll use a 16:9 aspect ratio, since that's so common. > In addition to...
Draft for review before making the corresponding changes to the text.
``` class metal : public material { public: metal(const color& a, double f) : albedo(a), fuzz(f < 1 ? f : 1) {} virtual bool scatter( const ray& r_in, const...
Currently defined as ``` inline vec3 unit_vector(vec3 v) { return v / v.length(); } ``` However, in situations where the vector is already unit length, this can be expensive. We...
If not, then the color computation in early versions of `ray_color()` need to ensure that the normal vector is unit length. Ref discussion #1060.
### Discussed in https://github.com/RayTracing/raytracing.github.io/discussions/1057 Originally posted by **LollipopFt** August 20, 2022 in the last line of `hit_sphere`, the code is: ```c return (discriminant > 0); ``` however, earlier in the...
In **Section 3: Bounding Volume Hierarchies** of "Ray Tracing: The Next Week", the given approach for splitting BVH volumes is as follows (emphasis mine): > I’ll choose the middle ground,...