From 4a7c4dad28a4df7642fde34228b621a895670874 Mon Sep 17 00:00:00 2001 From: Jonathan Hogg Date: Sun, 22 Dec 2024 14:39:11 +0000 Subject: [PATCH] Fix bug in nearest pixel sampling Enabling it would disable border settings. --- src/flitter/render/window/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flitter/render/window/__init__.py b/src/flitter/render/window/__init__.py index cc3a377b..f41bbd24 100644 --- a/src/flitter/render/window/__init__.py +++ b/src/flitter/render/window/__init__.py @@ -279,7 +279,7 @@ def render(self, node, references, *, srgb=False, colorbits=None, composite='ove else: sampler_args = {'border_color': (0, 0, 0, 0)} if node.get('nearest', 1, bool, False): - sampler_args = {'filter': (moderngl.NEAREST, moderngl.NEAREST)} + sampler_args['filter'] = moderngl.NEAREST, moderngl.NEAREST child_textures = self.child_textures samplers = [] self.glctx.extra['zero'].use(0)