|
@@ -195,12 +195,22 @@ static void draw_frame(struct gpu_delay_filter_data *f)
|
|
|
gs_effect_t *effect = obs_get_base_effect(OBS_EFFECT_DEFAULT);
|
|
|
gs_texture_t *tex = gs_texrender_get_texture(frame.render);
|
|
|
if (tex) {
|
|
|
+ const bool linear_srgb = gs_get_linear_srgb();
|
|
|
+
|
|
|
+ const bool previous = gs_framebuffer_srgb_enabled();
|
|
|
+ gs_enable_framebuffer_srgb(linear_srgb);
|
|
|
+
|
|
|
gs_eparam_t *image =
|
|
|
gs_effect_get_param_by_name(effect, "image");
|
|
|
- gs_effect_set_texture(image, tex);
|
|
|
+ if (linear_srgb)
|
|
|
+ gs_effect_set_texture_srgb(image, tex);
|
|
|
+ else
|
|
|
+ gs_effect_set_texture(image, tex);
|
|
|
|
|
|
while (gs_effect_loop(effect, "Draw"))
|
|
|
gs_draw_sprite(tex, 0, f->cx, f->cy);
|
|
|
+
|
|
|
+ gs_enable_framebuffer_srgb(previous);
|
|
|
}
|
|
|
}
|
|
|
|