提交 44f103de 编写于 作者: J jp9000

libobs: Fix rendering at end of the filter chain

When the filter chain finally reaches the source and the last filter in
the chain is set to not render directly (meaning it has to render to
texture), it would not render the source with any effect due to the fact
that it expects a filter to be present.
上级 7878fda4
......@@ -2058,13 +2058,18 @@ void obs_source_process_filter(obs_source_t *filter, gs_effect_t *effect,
GS_ZS_NONE);
if (gs_texrender_begin(filter->filter_texrender, cx, cy)) {
bool custom_draw = (parent_flags & OBS_SOURCE_CUSTOM_DRAW) != 0;
bool async = (parent_flags & OBS_SOURCE_ASYNC) != 0;
struct vec4 clear_color;
vec4_zero(&clear_color);
gs_clear(GS_CLEAR_COLOR, &clear_color, 0.0f, 0);
gs_ortho(0.0f, (float)cx, 0.0f, (float)cy, -100.0f, 100.0f);
obs_source_video_render(target);
if (target == parent && !custom_draw && !async)
obs_source_default_render(target, use_matrix);
else
obs_source_video_render(target);
gs_texrender_end(filter->filter_texrender);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册