From 1a9480cf25d18f15f154d4ac3ec9720ca9dfb2f7 Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Thu, 13 Oct 2022 12:42:43 +0200 Subject: Realtime Compositor: Keep interpolation in Scale node Currently, the scale node always changes the interpolation of its result to bilinear. This was done because the scale node does not have an interpolation option, unlike the Transform node, so a default of bilinear was assumed. This turned out to be problematic, because in the pixelation use cases, a nearest interpolation is typically preferred by the user. This patch changes the default interpolation of input nodes to bilinear, makes the scale node keep the interpolation of the input it receives, and makes the pixelate node changes the interpolation to nearest. In effect, for non-pixelation use cases, the default bilinear interpolation will be used, and for pixelation use cases, the nearest interpolation will be used unless explicitly specified using a node that sets the interpolation. --- source/blender/compositor/realtime_compositor/COM_domain.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/compositor') diff --git a/source/blender/compositor/realtime_compositor/COM_domain.hh b/source/blender/compositor/realtime_compositor/COM_domain.hh index 54d712f7578..99b40ae61cf 100644 --- a/source/blender/compositor/realtime_compositor/COM_domain.hh +++ b/source/blender/compositor/realtime_compositor/COM_domain.hh @@ -28,7 +28,7 @@ struct RealizationOptions { * result involves projecting it on a different domain, which in turn, involves sampling the * result at arbitrary locations, the interpolation identifies the method used for computing the * value at those arbitrary locations. */ - Interpolation interpolation = Interpolation::Nearest; + Interpolation interpolation = Interpolation::Bilinear; /* If true, the result will be repeated infinitely along the horizontal axis when realizing the * result. If false, regions outside of bounds of the result along the horizontal axis will be * filled with zeros. */ -- cgit v1.2.3