From 621413682e5bfadbe0dfc86254e8b94e93187463 Mon Sep 17 00:00:00 2001 From: Ralty <78720179+Raltyro@users.noreply.github.com> Date: Fri, 3 Apr 2026 07:02:09 +0700 Subject: [PATCH] Fix Backward Compatibility with Shader --- source/funkin/backend/shaders/FunkinShader.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/funkin/backend/shaders/FunkinShader.hx b/source/funkin/backend/shaders/FunkinShader.hx index 4db9babf..58fa9a4b 100644 --- a/source/funkin/backend/shaders/FunkinShader.hx +++ b/source/funkin/backend/shaders/FunkinShader.hx @@ -217,7 +217,7 @@ class FunkinShaderSourceAssembler extends FlxRuntimeShader.FlxShaderSourceAssemb return '/*include $key*/\n' + __appendIncludes(include, isVertex, includedKeys); }); - return __getImportFinder().map(source, (regex:EReg) -> + return __getImportCompatibilityFinder().map(source, (regex:EReg) -> { var key = regex.matched(1); if (includedKeys.get(key)) return '/*Recursive import $key*/\n'; @@ -261,8 +261,8 @@ class FunkinShaderSourceAssembler extends FlxRuntimeShader.FlxShaderSourceAssemb return result; } - private static inline function __getImportFinder():EReg { - return ~/(?:^|\s)#import\s+(?|"([^"]+)"|'([^']+)'|([^\s]+))/g; + private static inline function __getImportCompatibilityFinder():EReg { + return ~/#import\s+(?|"([^"]+)"|'([^']+)'|<(.*)>|([^\s]+))/g; } }