Skip to content

Parallelizing color sampling for a pixel#1

Open
RishabhRD wants to merge 1 commit into
masterfrom
parallel_sampling
Open

Parallelizing color sampling for a pixel#1
RishabhRD wants to merge 1 commit into
masterfrom
parallel_sampling

Conversation

@RishabhRD
Copy link
Copy Markdown
Owner

For rendering a pixel we throw n rays on viewport and render the average color of those rays. We refer this process as sampling. Because multiple rays are being sent and then being averaged, this process is good candidate for parallelisation.

However, parallel code is not performing any better than the sequential one. There can be multiple reason for the same. Some of them are:

  • For rendering each pixel, we actually do some memory allocation. This itself is taking so much time. Instead some kind of smart local allocators could help in this case to avoid OS calls.
  • There can be also a case for too much parallelism. It can be possible that sequentially computing the colors of each pixel is fast enough and parllelizing the same can be overhead.

Good level of profiling needs to be done for better insights. It would also help to gain more aspect of concurrency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant