From a9cb4a9cda80326a1a2b1e96ee9b17ffafb985b2 Mon Sep 17 00:00:00 2001 From: routersys Date: Thu, 2 Jul 2026 14:17:57 +0900 Subject: [PATCH] =?UTF-8?q?RenderKey=E3=81=AE=E3=82=B9=E3=82=AF=E3=83=AA?= =?UTF-8?q?=E3=83=97=E3=83=88=E6=AF=94=E8=BC=83=E3=82=92=E5=8F=82=E7=85=A7?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=81=B8=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaScript/LuaScriptEffectProcessor.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/LuaScript/LuaScriptEffectProcessor.cs b/LuaScript/LuaScriptEffectProcessor.cs index c11798f..a5ddf5d 100644 --- a/LuaScript/LuaScriptEffectProcessor.cs +++ b/LuaScript/LuaScriptEffectProcessor.cs @@ -42,7 +42,7 @@ namespace LuaScript bool Check3, bool HasColor, int Color, - string Script, + int ScriptVersion, int StringsVersion, TimelineSourceUsage Usage, Guid SceneId, @@ -76,6 +76,9 @@ namespace LuaScript private bool _effectChainWarned; private bool _gpuWarned; + private string? _scriptKeyRef; + private int _scriptKeyVersion; + private string _kernelSource = string.Empty; private bool _kernelResolved; private KernelProgram? _kernelProgram; @@ -242,6 +245,11 @@ namespace LuaScript var fps = desc.FPS; var time = desc.ItemPosition.Time.TotalSeconds; var script = item.Script ?? string.Empty; + if (!ReferenceEquals(script, _scriptKeyRef)) + { + _scriptKeyRef = script; + _scriptKeyVersion++; + } var layout = item.Layout; var t0 = ClampTrack(item.Track0.GetValue(frame, length, fps), layout, 0); @@ -261,7 +269,7 @@ namespace LuaScript t0, t1, t2, t3, s0, s1, s2, s3, c0, c1, c2, c3, hasColor, colorRgb, - script, RefreshStringParameters(), + _scriptKeyVersion, RefreshStringParameters(), desc.Usage, desc.SceneId, desc.TimelinePosition.Frame, desc.TimelinePosition.Time.TotalSeconds,