Fix the blend shader not working at all under render texture

This commit is contained in:
AbnormalPoof
2026-04-09 14:26:59 -06:00
committed by Hundrec
parent 04e120dfc9
commit e15d39d102
+9 -1
View File
@@ -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)
{