MCPcopy Create free account
hub / github.com/RenderKit/embree / renderTileTask

Function renderTileTask

tutorials/forest/forest_device.cpp:423–442  ·  view source on GitHub ↗

task that renders a single screen tile */

Source from the content-addressed store, hash-verified

421
422/* task that renders a single screen tile */
423void renderTileTask (int taskIndex, int threadIndex, int* pixels,
424 const unsigned int width,
425 const unsigned int height,
426 const float time,
427 const ISPCCamera& camera,
428 const int numTilesX,
429 const int numTilesY)
430{
431 const unsigned int tileY = taskIndex / numTilesX;
432 const unsigned int tileX = taskIndex - tileY * numTilesX;
433 const unsigned int x0 = tileX * TILE_SIZE_X;
434 const unsigned int x1 = min(x0+TILE_SIZE_X,width);
435 const unsigned int y0 = tileY * TILE_SIZE_Y;
436 const unsigned int y1 = min(y0+TILE_SIZE_Y,height);
437
438 for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++)
439 {
440 renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex]);
441 }
442}
443
444/* called by the C++ code to render */
445extern "C" void renderFrameStandard (int* pixels,

Callers 1

renderFrameStandardFunction · 0.70

Calls 2

renderPixelStandardFunction · 0.70
minFunction · 0.50

Tested by

no test coverage detected