Skip to content

Commit 44756ae

Browse files
committed
plugin: Only use DrawSrgbDecompress with srgb enabled
1 parent 2a2d2d2 commit 44756ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vkcapture.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,8 @@ static void vkcapture_source_render(void *data, gs_effect_t *effect)
563563
}
564564

565565
const enum gs_color_space color_space = gs_get_color_space();
566-
const char *tech_name = "DrawSrgbDecompress";
566+
const bool linear_srgb = gs_get_linear_srgb();
567+
const char *tech_name = linear_srgb ? "DrawSrgbDecompress" : "Draw";
567568
float multiplier = 1.f;
568569

569570
if (color_space == GS_CS_709_EXTENDED) {
@@ -573,7 +574,6 @@ static void vkcapture_source_render(void *data, gs_effect_t *effect)
573574

574575
effect = obs_get_base_effect(ctx->allow_transparency ? OBS_EFFECT_DEFAULT : OBS_EFFECT_OPAQUE);
575576

576-
const bool linear_srgb = gs_get_linear_srgb();
577577
const bool previous = gs_framebuffer_srgb_enabled();
578578
gs_enable_framebuffer_srgb(linear_srgb);
579579

0 commit comments

Comments
 (0)