From 72efe8b9426210690d1b65b48e42a03699f81e5d Mon Sep 17 00:00:00 2001 From: jpark37 Date: Tue, 19 Jan 2021 15:01:51 -0800 Subject: [PATCH] libobs: Update render_item to enable linear SRGB Does nothing without linear-aware modifications to sources. --- libobs/obs-scene.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libobs/obs-scene.c b/libobs/obs-scene.c index 5a8a8e81c..df46085f3 100644 --- a/libobs/obs-scene.c +++ b/libobs/obs-scene.c @@ -570,6 +570,7 @@ static inline void render_item(struct obs_scene_item *item) } } + const bool previous = gs_set_linear_srgb(true); gs_matrix_push(); gs_matrix_mul(&item->draw_transform); if (item->item_render) { @@ -578,6 +579,7 @@ static inline void render_item(struct obs_scene_item *item) obs_source_video_render(item->source); } gs_matrix_pop(); + gs_set_linear_srgb(previous); cleanup: GS_DEBUG_MARKER_END();