提交 f4af2fca 编写于 作者: J jp9000

libobs: Always clear render target filter

This fixes a bug where the previous contents of a filter's render target
texture might become visible if using alpha.
上级 dfde8d4a
......@@ -2048,8 +2048,14 @@ 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)) {
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);
gs_texrender_end(filter->filter_texrender);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册