- fade_chain_hq_input0:connect_signal(0)
- set_neutral_color(fade_chain_hq_wb0_effect, input0_neutral_color)
- fade_chain_hq_input1:connect_signal(1)
- set_neutral_color(fade_chain_hq_wb1_effect, input1_neutral_color)
- local tt = (t - transition_start) / (transition_end - transition_start)
- if tt < 0.0 then
- tt = 0.0
- elseif tt > 1.0 then
- tt = 1.0
+ end
+ return static_chain_hq, prepare
+ elseif live_signal_num == FADE_VTV_SIGNAL_NUM then -- Fade video-to-video.
+ prepare = function()
+ fade_vtv_chain_hq_input0:connect_signal(fade_src_signal)
+ set_neutral_color_from_signal(fade_vtv_chain_hq_wb0_effect, fade_src_signal)
+ fade_vtv_chain_hq_input1:connect_signal(fade_dst_signal)
+ set_neutral_color_from_signal(fade_vtv_chain_hq_wb1_effect, fade_dst_signal)
+ local tt = calc_fade_progress(t, transition_start, transition_end)
+
+ fade_vtv_chain_mix_effect:set_float("strength_first", 1.0 - tt)
+ fade_vtv_chain_mix_effect:set_float("strength_second", tt)
+ end
+ return fade_vtv_chain_hq, prepare
+ elseif live_signal_num == FADE_VTP_SIGNAL_NUM then -- Fade video-to-picture (or picture-to-video).
+ prepare = function()
+ local tt
+ if fade_src_signal == STATIC_SIGNAL_NUM then
+ fade_vtp_chain_hq_input0:connect_signal(fade_dst_signal)
+ set_neutral_color_from_signal(fade_vtp_chain_hq_wb0_effect, fade_dst_signal)
+ tt = 1.0 - calc_fade_progress(t, transition_start, transition_end)
+ else
+ fade_vtp_chain_hq_input0:connect_signal(fade_src_signal)
+ set_neutral_color_from_signal(fade_vtp_chain_hq_wb0_effect, fade_src_signal)
+ tt = calc_fade_progress(t, transition_start, transition_end)