From 04ae0fe46ba1f08ef141a051187bea3763afda8d Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Fri, 9 Sep 2022 13:57:04 +0200 Subject: Realtime Compositor: Implement blur node This patch implements the blur node for the realtime compositor. The patch is still missing the Variable Size option because it depends on the Erode/Dilate node, which is yet to be implemented. Furthermore, there are a number of optimizations that can be implemented, the most important of which is the IIR implementation of the Fast Gaussian filter, as well as the use of hardware filtering and thread local memory. The latter of which was attempted but was not robust enough, so it will be submitted as separate patch. Differential Revision: https://developer.blender.org/D15663 Reviewed By: Clement Foucault --- source/blender/render/intern/initrender.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/render') diff --git a/source/blender/render/intern/initrender.cc b/source/blender/render/intern/initrender.cc index cc05aa8621e..1ea93cbf6c8 100644 --- a/source/blender/render/intern/initrender.cc +++ b/source/blender/render/intern/initrender.cc @@ -124,7 +124,8 @@ float RE_filter_value(int type, float x) } return 1.0f - x; - case R_FILTER_GAUSS: { + case R_FILTER_GAUSS: + case R_FILTER_FAST_GAUSS: { const float two_gaussfac2 = 2.0f * gaussfac * gaussfac; x *= 3.0f * gaussfac; return 1.0f / sqrtf((float)M_PI * two_gaussfac2) * expf(-x * x / two_gaussfac2); -- cgit v1.2.3