mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
libobs: Turn blending off for filter renders
When rendering a filter to a texture, the target is empty and unused, so there's no reason for blending to be on when rendering the filter to a render target.
This commit is contained in:
@@ -2058,6 +2058,9 @@ void obs_source_process_filter_begin(obs_source_t *filter,
|
||||
filter->filter_texrender = gs_texrender_create(format,
|
||||
GS_ZS_NONE);
|
||||
|
||||
gs_blend_state_push();
|
||||
gs_blend_function(GS_BLEND_ONE, GS_BLEND_ZERO);
|
||||
|
||||
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;
|
||||
@@ -2074,6 +2077,8 @@ void obs_source_process_filter_begin(obs_source_t *filter,
|
||||
|
||||
gs_texrender_end(filter->filter_texrender);
|
||||
}
|
||||
|
||||
gs_blend_state_pop();
|
||||
}
|
||||
|
||||
void obs_source_process_filter_end(obs_source_t *filter, gs_effect_t *effect,
|
||||
|
||||
Reference in New Issue
Block a user