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

Function renderTileStandard

tutorials/grid_geometry/grid_geometry_device.cpp:630–651  ·  view source on GitHub ↗

renders a single screen tile */

Source from the content-addressed store, hash-verified

628
629/* renders a single screen tile */
630void renderTileStandard(int taskIndex,
631 int threadIndex,
632 int* pixels,
633 const unsigned int width,
634 const unsigned int height,
635 const float time,
636 const ISPCCamera& camera,
637 const int numTilesX,
638 const int numTilesY)
639{
640 const unsigned int tileY = taskIndex / numTilesX;
641 const unsigned int tileX = taskIndex - tileY * numTilesX;
642 const unsigned int x0 = tileX * TILE_SIZE_X;
643 const unsigned int x1 = min(x0+TILE_SIZE_X,width);
644 const unsigned int y0 = tileY * TILE_SIZE_Y;
645 const unsigned int y1 = min(y0+TILE_SIZE_Y,height);
646
647 for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++)
648 {
649 renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex]);
650 }
651}
652
653/* task that renders a single screen tile */
654void renderTileTask (int taskIndex, int threadIndex, int* pixels,

Callers 1

renderTileTaskFunction · 0.70

Calls 2

renderPixelStandardFunction · 0.70
minFunction · 0.50

Tested by

no test coverage detected