Live data from Hacker News

Simple software rasterizer in a single C++11 header file

github.com

21–23 of 23 posts

Re: Simple software rasterizer in a single C++11 header file

#21
post #15
post #14

Earlier quoted context omitted.

Thanks for the explanation. How are multiple hops in light path handled without having the computational complexity go insane?

They aren't..... Some popular shortcuts include: - Cut at n hops (with n=4 or n=8 popular choices), defaulting to "ambient" light after that - Give each material an "ambient" color, so that you don't actually need to trace every pixel back into every light source (just into e.g. spotlights) - Solve a radiosity equation for the surface colors, and trace rays for textures/reflections. Complete ray tracing is, indeed, i…

(too late to edit:) that was supposed to be "multiple rays through every pixel "

Re: Simple software rasterizer in a single C++11 header file

#22
post #18

Earlier quoted context omitted.

Do you have links to any resources the students found handy? I'm not very familiar with anything to do with the graphics stack other than familiarity with some of the words.

I'm not the author of the original comment, but when I was in high school I found the Graphics Programming Black Book to be useful for understanding graphics primitives and how they can be implemented in software. It's available for free online: http://www.gamedev.net/page/resources/_/technical/graphics-p... Maybe start with chapter 38: http://downloads.gamedev.net/pdf/gpbb/gpbb38.pdf

Thanks, this is a great read (even though parts seem dated, for example, the TOC has chapters on the 386 and 486), I'm surprised that I haven't stumbled upon it before.

Re: Simple software rasterizer in a single C++11 header file

#23
post #22

Earlier quoted context omitted.

I'm not the author of the original comment, but when I was in high school I found the Graphics Programming Black Book to be useful for understanding graphics primitives and how they can be implemented in software. It's available for free online: http://www.gamedev.net/page/resources/_/technical/graphics-p... Maybe start with chapter 38: http://downloads.gamedev.net/pdf/gpbb/gpbb38.pdf

Thanks, this is a great read (even though parts seem dated, for example, the TOC has chapters on the 386 and 486), I'm surprised that I haven't stumbled upon it before.

The latest Core i7 still has all the same instructions as a 386 or 486, so while these days you'd probably use SIMD instructions, the code will still run and run very, very fast.
Post reply on HN