From e15d39d102f7df24ca2c82c812612e2728d38013 Mon Sep 17 00:00:00 2001 From: AbnormalPoof Date: Wed, 1 Apr 2026 04:47:49 -0500 Subject: [PATCH] Fix the blend shader not working at all under render texture --- source/funkin/graphics/FunkinSprite.hx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/funkin/graphics/FunkinSprite.hx b/source/funkin/graphics/FunkinSprite.hx index 41eab2657..ed30560fd 100644 --- a/source/funkin/graphics/FunkinSprite.hx +++ b/source/funkin/graphics/FunkinSprite.hx @@ -874,7 +874,15 @@ class FunkinSprite extends FlxAnimate #if !flash if (willUseRenderTexture) { - if (_renderTexture == null) _renderTexture = new RenderTexture(Math.ceil(bounds.width), Math.ceil(bounds.height)); + if (_renderTexture == null) + { + _renderTexture = new RenderTexture(Math.ceil(bounds.width), Math.ceil(bounds.height)); + + // Replace the render texture's camera with a FunkinCamera + // This allows the blend shader to work inside the render texture! + @:privateAccess + _renderTexture._camera = new FunkinCamera('', 0, 0, Math.ceil(bounds.width), Math.ceil(bounds.height)); + } if (_renderTextureDirty) {