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

Function renderPixelStandard

tutorials/interpolation/interpolation_device.cpp:408–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406}
407
408void renderPixelStandard(const TutorialData& data,
409 int x, int y,
410 int* pixels,
411 const unsigned int width,
412 const unsigned int height,
413 const float time,
414 const ISPCCamera& camera,
415 RayStats& stats)
416{
417 /* calculate pixel color */
418 Vec3fa color = renderPixel(data,(float)x,(float)y,camera,stats);
419
420 /* write color to framebuffer */
421 unsigned int r = (unsigned int) (255.0f * clamp(color.x,0.0f,1.0f));
422 unsigned int g = (unsigned int) (255.0f * clamp(color.y,0.0f,1.0f));
423 unsigned int b = (unsigned int) (255.0f * clamp(color.z,0.0f,1.0f));
424 pixels[y*width+x] = (b << 16) + (g << 8) + r;
425}
426
427/* task that renders a single screen tile */
428void renderTileTask (int taskIndex, int threadIndex, int* pixels,

Callers 2

renderTileTaskFunction · 0.70
renderFrameStandardFunction · 0.70

Calls 2

renderPixelFunction · 0.70
clampFunction · 0.50

Tested by

no test coverage detected