Skip to content

Conversation

@leMaik
Copy link
Member

@leMaik leMaik commented Aug 11, 2024

Many scenes contain a lot of sky. Currently, Chunky renders these areas to the full SPP, although their color will never change as we don't have any effects that would apply to a ray that doesn't hit a block.

This PR skips tiles (8x8 pixels by default) that only have immediate sky hits for the first samples per pass (defaults to 1) samples for future samples. This could lead to anti-aliasing errors due to the first pass not hitting a block for a pixel but future passes (for a different sub-pixel )would hit the block. This could be mitigated by increasing spp per pass.

For example in the following scene, the greyed out pixels would only be rendered once whereas all other areas are rendered as usual.
image

Depending on the amount of sky in the scene, this can decrease the rendering time. Needs benchmarks, though.

@JustinTimeCuber
Copy link
Contributor

Might be a minor thing and difficult to notice in most situations, but couldn't this cause aliasing effects in the sky? This would probably be noticeable when using a high resolution skymap but a lower resolution canvas

@Peregrine05
Copy link
Member

I wonder if it would be good to add a separate Sky target SPP control that sets the target SPP for sky-only tiles.

@jackjt8
Copy link
Member

jackjt8 commented Aug 13, 2024

we don't have any effects that would apply to a ray that doesn't hit a block

Depth of Field does apply to the sky. It's not noticeable when using a generated sky, and we could probably skip sampling in those cases... However if using a skymap (or any texture) DoF is visible. I use DoF to mask low quality skymaps all the time.

Low SPP example...

image

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants