aboutsummaryrefslogtreecommitdiff
path: root/src/kernel.h
diff options
context:
space:
mode:
authorallusive-dev <[email protected]>2023-10-30 15:12:21 +1100
committerallusive-dev <[email protected]>2023-10-30 15:12:21 +1100
commitac33357e7ce7c474aeaffc92e381020289d767a2 (patch)
tree7f05fa79b3ccd7834f85cc65a07fbd4f8030eb94 /src/kernel.h
parentCreate FUNDING.yml (diff)
downloadcompfy-ac33357e7ce7c474aeaffc92e381020289d767a2.tar.xz
compfy-ac33357e7ce7c474aeaffc92e381020289d767a2.zip
Version 1.01.0.0
Diffstat (limited to 'src/kernel.h')
-rw-r--r--src/kernel.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/kernel.h b/src/kernel.h
index 251d127..d1dd2ee 100644
--- a/src/kernel.h
+++ b/src/kernel.h
@@ -22,12 +22,15 @@ double attr_pure sum_kernel_normalized(const conv *map, int x, int y, int width,
/// `size`.
conv *gaussian_kernel(double r, int size);
+/// Estimate the best standard deviation for a give kernel size.
+double gaussian_kernel_std_for_size(double size, double row_limit);
+
/// Create a gaussian kernel with auto detected standard deviation. The choosen standard
/// deviation tries to make sure the outer most pixels of the shadow are completely
/// transparent.
///
/// @param[in] shadow_radius the radius of the shadow
-conv *gaussian_kernel_autodetect_deviation(int shadow_radius);
+conv *gaussian_kernel_autodetect_deviation(double shadow_radius);
/// preprocess kernels to make shadow generation faster
/// shadow_sum[x*d+y] is the sum of the kernel from (0, 0) to (x, y), inclusive