Skip rendering tiles that only contain sky. #1748
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Depending on the amount of sky in the scene, this can decrease the rendering time. Needs benchmarks, though.