mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
libobs: Fix color space auto-convert blending
Need premultiplied alpha for this, not straight alpha.
This commit is contained in:
parent
05b673381f
commit
74daf5cbaf
@ -2615,6 +2615,9 @@ static void source_render(obs_source_t *source, gs_effect_t *effect)
|
||||
"multiplier"),
|
||||
multiplier);
|
||||
|
||||
gs_blend_state_push();
|
||||
gs_blend_function(GS_BLEND_ONE, GS_BLEND_INVSRCALPHA);
|
||||
|
||||
const size_t passes = gs_technique_begin(tech);
|
||||
for (size_t i = 0; i < passes; i++) {
|
||||
gs_technique_begin_pass(tech, i);
|
||||
@ -2623,6 +2626,8 @@ static void source_render(obs_source_t *source, gs_effect_t *effect)
|
||||
}
|
||||
gs_technique_end(tech);
|
||||
|
||||
gs_blend_state_pop();
|
||||
|
||||
gs_enable_framebuffer_srgb(previous);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user