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

Split downsampling in two passes #3

Open
Rodrigodd opened this issue Feb 3, 2024 · 0 comments
Open

Split downsampling in two passes #3

Rodrigodd opened this issue Feb 3, 2024 · 0 comments

Comments

@Rodrigodd
Copy link
Owner

The multi-sampling option works by multiplying each dimension of the attractor's aggregation buffer, and then downsampling it using a Lanczos kernel in the shader. It also applies the colormap to each pixel right before scalar-multiplying with the kernel, so each pixel is unnecessarily colormapped multiple times.

The problem is that the kernel grows quadratically with the multi-sampling order, making the rendering too slow to run in full real-time for a non-small multisampling value. But the kernel used is actually separable, so we can make the slowdown grow linearly by separating the downsampling into horizontal and vertical passes.

This was not first done, not only because it was easier to implement, but also because I was afraid of using really big intermediate textures (the current approach only uses a single texture for the output, and a u32 array for the input aggregate buffer). But this choice doesn't work well enough, so better to risk the alternative approach. The "too big textures" problem can at least be solved by splitting the rendering into tiles.

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

No branches or pull requests

1 participant