From cc89321c9cb9b8d909c20afdec0b9e03b3ed2819 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Fri, 23 Jun 2023 10:57:56 -0700 Subject: [PATCH] Reset filter/repeat state of textures in GL Compatibility renderer when render target is cleared --- drivers/gles3/storage/texture_storage.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp index fd6cb722d23..8a57476a739 100644 --- a/drivers/gles3/storage/texture_storage.cpp +++ b/drivers/gles3/storage/texture_storage.cpp @@ -1938,6 +1938,8 @@ void TextureStorage::_clear_render_target(RenderTarget *rt) { tex->active = false; tex->render_target = nullptr; tex->is_render_target = false; + tex->gl_set_filter(RS::CANVAS_ITEM_TEXTURE_FILTER_MAX); + tex->gl_set_repeat(RS::CANVAS_ITEM_TEXTURE_REPEAT_MAX); } } else { Texture *tex = get_texture(rt->overridden.color);