fixed composition when color management is off
This commit is contained in:
+22
-10
@@ -252,20 +252,32 @@ void RenderThread::paint() {
|
|||||||
|
|
||||||
FramebufferObject& buffer = front_buffer_switcher ? front_buffer_1 : front_buffer_2;
|
FramebufferObject& buffer = front_buffer_switcher ? front_buffer_1 : front_buffer_2;
|
||||||
|
|
||||||
// Convert linear frame to display color space
|
// Blit the composite buffer to one of the front buffers
|
||||||
|
bool standard_blit = true;
|
||||||
|
|
||||||
#ifndef NO_OCIO
|
#ifndef NO_OCIO
|
||||||
olive::rendering::OCIOBlit(ocio_shader.get(),
|
// If we're color managing, conver the linear composited frame to display color space
|
||||||
ocio_lut_texture,
|
if (olive::CurrentConfig.enable_color_management && ocio_shader != nullptr) {
|
||||||
buffer,
|
olive::rendering::OCIOBlit(ocio_shader.get(),
|
||||||
composite_buffer.texture());
|
ocio_lut_texture,
|
||||||
|
buffer,
|
||||||
|
composite_buffer.texture());
|
||||||
|
|
||||||
|
standard_blit = false;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
buffer.BindBuffer();
|
|
||||||
composite_buffer.BindTexture();
|
|
||||||
olive::rendering::Blit(pipeline_program.get());
|
|
||||||
composite_buffer.ReleaseTexture();
|
|
||||||
buffer.ReleaseBuffer();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// If we're not color managing, just blit normally
|
||||||
|
if (standard_blit) {
|
||||||
|
buffer.BindBuffer();
|
||||||
|
composite_buffer.BindTexture();
|
||||||
|
olive::rendering::Blit(pipeline_program.get());
|
||||||
|
composite_buffer.ReleaseTexture();
|
||||||
|
buffer.ReleaseBuffer();
|
||||||
|
}
|
||||||
|
|
||||||
// flush changes
|
// flush changes
|
||||||
f->glFinish();
|
f->glFinish();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user