13.07.2015 Views

Raytracing

Raytracing

Raytracing

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Computing Ray Color// Compute the color for a raycolor RayColor(ray)Test ray for intersectionIf(intersection)Determine for intersection:intersection point, normal, material, texture colorcolor = compute-ambient-colorforeach lightif shadowfeeler does not hit anythingcolor += compute-diffuse-color-from-lightcolor += compuer-specular-color-from-lightreturn colorelsereturn background-colorCSE 472 Spring 20139But, be careful or you get:CSE 472 Spring 2013Stipple!10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!