Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor pixel subsampling #1421

Merged
merged 2 commits into from
Mar 10, 2024
Merged

Refactor pixel subsampling #1421

merged 2 commits into from
Mar 10, 2024

Conversation

hollasch
Copy link
Collaborator

@hollasch hollasch commented Mar 9, 2024

  • Simplify pixel sampling to make the sampling functions simpler and agnostic about their use as pixel sampling functions. Now they sample an idealized unit square or disk and are ignorant about image components.
  • pixel_sample_xxx() functions renamed to sample_xx().
  • Rename pixel_sample_scale to pixel_samples_scale.
  • Reworded some comments for clarity.
  • I really wish I could have come up with a better rename for sqrt_spp and recip_sqrt_spp, but I've been unable to think of anything better.

- Simplify pixel sampling to make the sampling functions simpler and
  agnostic about their use as pixel sampling functions. Now they sample
  an idealized unit square or disk and are ignorant about image
  components.
- pixel_sample_xxx() functions renamed to sample_xx().
- Rename pixel_sample_scale to pixel_samples_scale.
- Reworded some comments for clarity.
- I really wish I could have come up with a better rename for `sqrt_spp`
  and `recip_sqrt_spp`, but I've been unable to think of anything
  better.
@hollasch hollasch added this to the v4.0.0-alpha.2 milestone Mar 9, 2024
@hollasch hollasch requested a review from a team March 9, 2024 23:29
@hollasch hollasch self-assigned this Mar 9, 2024
Copy link
Contributor

@armansito armansito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I left a couple of suggestions that I don't feel particularly strong about, so feel free to ignore them.

  • I really wish I could have come up with a better rename for sqrt_spp and recip_sqrt_spp, but I've been unable to think of anything better.

I think these names are fine.

books/RayTracingTheRestOfYourLife.html Show resolved Hide resolved
books/RayTracingTheRestOfYourLife.html Outdated Show resolved Hide resolved
@hollasch hollasch merged commit 2c6d26c into dev Mar 10, 2024
@hollasch hollasch deleted the refactor-pixel-sampling branch March 10, 2024 21:37
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.

None yet

2 participants