Add a switch between SRGB and linear colors in the debayer shader

This commit is contained in:
Martijn Braam
2023-07-22 16:29:23 +02:00
parent c62ac5950f
commit 128a3696c4
6 changed files with 20 additions and 13 deletions

View File

@@ -927,7 +927,7 @@ on_output_changed(bool format_changed)
if (gles2_debayer)
gles2_debayer_free(gles2_debayer);
gles2_debayer = gles2_debayer_new(state_proc.mode->format);
gles2_debayer = gles2_debayer_new(state_proc.mode->format, state_proc.colorspace);
check_gl();
gles2_debayer_use(gles2_debayer);
@@ -990,6 +990,7 @@ update_state(MPPipeline *pipeline, const mp_state_proc *new_state)
}
state_proc.mode = new_state->camera->current_mode;
state_proc.colorspace = new_state->colorspace;
state_proc.preview_width = new_state->preview_width;
state_proc.preview_height = new_state->preview_height;