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

Function renderTileStandard

tutorials/dynamic_scene/dynamic_scene_device.cpp:220–241  ·  view source on GitHub ↗

renders a single screen tile */

Source from the content-addressed store, hash-verified

218
219/* renders a single screen tile */
220void renderTileStandard(int taskIndex,
221 int threadIndex,
222 int* pixels,
223 const unsigned int width,
224 const unsigned int height,
225 const float time,
226 const ISPCCamera& camera,
227 const int numTilesX,
228 const int numTilesY)
229{
230 const unsigned int tileY = taskIndex / numTilesX;
231 const unsigned int tileX = taskIndex - tileY * numTilesX;
232 const unsigned int x0 = tileX * TILE_SIZE_X;
233 const unsigned int x1 = min(x0+TILE_SIZE_X,width);
234 const unsigned int y0 = tileY * TILE_SIZE_Y;
235 const unsigned int y1 = min(y0+TILE_SIZE_Y,height);
236
237 for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++)
238 {
239 renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex]);
240 }
241}
242
243/* task that renders a single screen tile */
244void 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