what I am trying to do is improving my actual Ray Tracer to create a Distributed Ray Tracer. I have been wandering on internet and all I could found about its implementation was just short stuff like:
-Replace single ray with distribution of rays -Shoot multiple rays distributed over an interval -Shoot multiple rays through each pixel and vary each ray randomly
My question is: What does a "distribution" mean? How can I vary a distribution of rays that go through a pixel? In my normal Ray Tracer I shoot one ray per pixel. For "distribution" of rays I can understand that I should shoot multiple rays instead of only one. But at the same time I shoot the ray through my pixel with coordinates (x,y).
for (int x = 0; x < WINDOW_WIDTH; x++)
{
for (int y = 0; y < WINDOW_HEIGHT; y++)
{
Vec3<float> rayDir = camera->pixelToWorld(x, y) - camera->position;
}
}
So, how can I "vary each ray randomly" ? Thanks.