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

Function renderTileTask

tutorials/pathtracer/pathtracer_device.cpp:1640–1660  ·  view source on GitHub ↗

task that renders a single screen tile */

Source from the content-addressed store, hash-verified

1638
1639/* task that renders a single screen tile */
1640void renderTileTask (int taskIndex, int threadIndex, int* pixels,
1641 const unsigned int width,
1642 const unsigned int height,
1643 const float time,
1644 const ISPCCamera& camera,
1645 const int numTilesX,
1646 const int numTilesY)
1647{
1648 const int t = taskIndex;
1649 const unsigned int tileY = t / numTilesX;
1650 const unsigned int tileX = t - tileY * numTilesX;
1651 const unsigned int x0 = tileX * TILE_SIZE_X;
1652 const unsigned int x1 = min(x0+TILE_SIZE_X,width);
1653 const unsigned int y0 = tileY * TILE_SIZE_Y;
1654 const unsigned int y1 = min(y0+TILE_SIZE_Y,height);
1655
1656 for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++)
1657 {
1658 renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex],RTC_FEATURE_FLAG_ALL);
1659 }
1660}
1661
1662
1663/***************************************************************************************/

Callers 1

renderFrameStandardFunction · 0.70

Calls 2

renderPixelStandardFunction · 0.70
minFunction · 0.50

Tested by

no test coverage detected