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

Function renderTileTask

tutorials/viewer/viewer_device.cpp:285–305  ·  view source on GitHub ↗

task that renders a single screen tile */

Source from the content-addressed store, hash-verified

283
284/* task that renders a single screen tile */
285void renderTileTask (int taskIndex, int threadIndex, int* pixels,
286 const unsigned int width,
287 const unsigned int height,
288 const float time,
289 const ISPCCamera& camera,
290 const int numTilesX,
291 const int numTilesY)
292{
293 const int t = taskIndex;
294 const unsigned int tileY = t / numTilesX;
295 const unsigned int tileX = t - tileY * numTilesX;
296 const unsigned int x0 = tileX * TILE_SIZE_X;
297 const unsigned int x1 = min(x0+TILE_SIZE_X,width);
298 const unsigned int y0 = tileY * TILE_SIZE_Y;
299 const unsigned int y1 = min(y0+TILE_SIZE_Y,height);
300
301 for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++)
302 {
303 renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex],g_feature_mask);
304 }
305}
306
307Vec3fa old_p;
308

Callers 1

renderFrameStandardFunction · 0.70

Calls 2

renderPixelStandardFunction · 0.70
minFunction · 0.50

Tested by

no test coverage detected