| 406 | } |
| 407 | |
| 408 | void renderPixelStandard(const TutorialData& data, |
| 409 | int x, int y, |
| 410 | int* pixels, |
| 411 | const unsigned int width, |
| 412 | const unsigned int height, |
| 413 | const float time, |
| 414 | const ISPCCamera& camera, |
| 415 | RayStats& stats) |
| 416 | { |
| 417 | /* calculate pixel color */ |
| 418 | Vec3fa color = renderPixel(data,(float)x,(float)y,camera,stats); |
| 419 | |
| 420 | /* write color to framebuffer */ |
| 421 | unsigned int r = (unsigned int) (255.0f * clamp(color.x,0.0f,1.0f)); |
| 422 | unsigned int g = (unsigned int) (255.0f * clamp(color.y,0.0f,1.0f)); |
| 423 | unsigned int b = (unsigned int) (255.0f * clamp(color.z,0.0f,1.0f)); |
| 424 | pixels[y*width+x] = (b << 16) + (g << 8) + r; |
| 425 | } |
| 426 | |
| 427 | /* task that renders a single screen tile */ |
| 428 | void renderTileTask (int taskIndex, int threadIndex, int* pixels, |
no test coverage detected