13.07.2015 Views

Raytracing

Raytracing

Raytracing

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Antialiasing Ray TracingCPoisson2D poissonPoisson.SetMinDistance( 1 / (2 * sqrt(antialiascnt) )for r = 0 to height-1for c = 0 to width-1poisson.reset()color = (0, 0, 0)for a=1 to antialiascntp = poisson.generate()ray.origin = (0, 0, 0)ray.direction.x = xmin + (c + p.x) / width * xwidray.direction.y = ymin + (r + p.y) / height * ywidcolor += RayColor(ray)color /= antialiascntpixel(r, c) = RangeBound(color)CSE 472 Spring 201341No AntialiasingCSE 472 Spring 201342

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

Saved successfully!

Ooh no, something went wrong!