News for hackers. Stuff that matters.
Re:Lines of bare C++: raytracing made simple by twtw on Sunday January 20, 2019 @06:02PM (#18956186)
This is pretty similar to Peter Shirley's "Ray Tracing in a Weekend" series, which gives some more detail and discusses the ideas more, and which recently was put online as "pay what you want": https://twitter.com/peter_shirley/status/984947257035243520?...

The bible for raytracing techniques is PBRT, which, funny enough, is also now available online: http://www.pbr-book.org/

It is a pretty fantastic time for easily available, high quality resources on rendering in general and ray tracing in particular.

Re:Lines of bare C++: raytracing made simple by agbell on Sunday January 20, 2019 @09:03PM (#18957013)
There is a great pragmatic programmers book on building a ray tracer that just came out: https://pragprog.com/book/jbtracer/the-ray-tracer-challenge

Its langauge neutral, which is interesting.

Re:Lines of bare C++: raytracing made simple by vintagedave on Monday January 21, 2019 @06:36PM (#18964667)
This is by Jamis Buck! He wrote Mazes for Programmers, one of the best programming books I've ever read. It is clear and well-explained; you could write the code from the text description without seeing the code samples, which is incredibly rare.

I had no idea he'd written more. Going by author alone, this book is a must-buy.

Re:Lines of bare C++: raytracing made simple by dragontamer on Sunday January 20, 2019 @07:34PM (#18956610)
Smallpt is another project which has been written and rewritten to demonstrate raytracing.

It really shows how simple the core concept is. All of these programs are well under 300 lines.

Faster ray tracers have better data structures and more bsdf functions. But regardless, the real benefit of raytracing is the simplicity of the concept.

Re:Lines of bare C++: raytracing made simple by winter_blue on Sunday January 20, 2019 @11:35PM (#18957665)
Wow, this is pretty amazing. I'm looking forward to studying this.

The author has also written an impressive OpenGL-like renderer in just 500 lines: https://github.com/ssloy/tinyrenderer/wiki

Re:Lines of bare C++: raytracing made simple by sjroot on Monday January 21, 2019 @08:44AM (#18960312)
> Note: It makes no sense just to look at my code, nor just to read this article with a cup of tea in hand.

It's a good thing I have coffee then. As someone who is not very familiar with computer graphics programming, I did enjoy reading through this.

Re:Lines of bare C++: raytracing made simple by petermcneeley on Sunday January 20, 2019 @05:39PM (#18956073)
Re:Lines of bare C++: raytracing made simple by nayuki on Sunday January 20, 2019 @09:55PM (#18957275)
Basically the same as another post on the HN front page: https://news.ycombinator.com/item?id=18956283
Re:Lines of bare C++: raytracing made simple by FrankDixon on Sunday January 20, 2019 @06:01PM (#18956180)
beautiful c++!