No description
Find a file
Stephen Seo dfc78540db WIP combine Vulkan filter and min_max to cmd buf
This commit does some preparation for a new Vulkan compute shader
"blue_noise_filter.glsl". Note that every call of "filter" is followed
by a call to "min_max". The goal is to combine a single invocation of
Vulkan "filter" and log(n) invocations of Vulkan "min_max" in the same
command buffer, which may help with performance. This will be achieved
by passing the "max_in_buf" to the new "filter" compute shader, which
will hold the results of applying the precomputed-gaussian. This buffer
will then be copied to "min_in_buf", and then all is set to call the
Vulkan "min_max" compute shader log(n) times.

Note that log(n) comes from the fact that the Vulkan "min_max" compute
shader does a "reduce" on the input buffers where each SIMD invocation
compares two values and reduces it to 1. Doing this approximately log(n)
(log base 2) times will reduce the input gradually into a single minimum
and single maximum. This works due to having two separate "layouts" for
the same "min_max" shader where the "in" and "out" buffers are swapped
per "layout", and so by calling the other layout each time ensures that
the proper buffers are reduced. (This work has already been done. What's
left is to combine the "filter" and "min_max" Vulkan compute shaders
into the same Vulkan command buffer. But first, the actual setup for the
new Vulkan "filter" compute shader still has some work to do.)
2024-04-10 17:43:24 +09:00
src WIP combine Vulkan filter and min_max to cmd buf 2024-04-10 17:43:24 +09:00
.clangd Switch to CMake, try to fix grayscale blue-noise 2021-10-06 19:54:07 +09:00
.gitignore Switch to CMake, try to fix grayscale blue-noise 2021-10-06 19:54:07 +09:00
CMakeLists.txt CMakeLists.txt: Debug flag "-Og" instead of "-O0" 2024-03-20 16:20:13 +09:00
LICENSE Update LICENSE year 2024-03-06 17:38:53 +09:00
README.md Update README.md 2024-04-01 11:30:42 +09:00

Blue_Noise_Generation

Currently, this project only generates blue-noise, which can be used for dithering.
The blue-noise can be generated via OpenCL, Vulkan compute, or with threads on the CPU.