X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=simple.lua;h=2bff8f341a09387f643d92bc397b14b1d92ea501;hp=6ad875029a12cd51ede719deab0bd81c733621c6;hb=703e00da89118df9be0354dda621bed023e6030e;hpb=3938b89c04d61cc4d279cf452aeddf44e6135a88 diff --git a/simple.lua b/simple.lua index 6ad8750..2bff8f3 100644 --- a/simple.lua +++ b/simple.lua @@ -166,9 +166,13 @@ function get_chain(num, t, width, height, signals) signal_num = num - 2 end + -- Make a copy of the current neutral color before returning, so that the + -- returned prepare function is unaffected by state changes made by the UI + -- before it is rendered. + local color = input_neutral_color[signal_num + 1] + local prepare = function() chain.input:connect_signal(signal_num) - local color = input_neutral_color[signal_num + 1] chain.wb_effect:set_vec3("neutral_color", color[1], color[2], color[3]) end return chain.chain, prepare