plugins/backgroundcontrast: use the same texture format as the main framebuffer
With color management, the main framebuffer has values over 1. As the effect used GL_RGBA8 for its fbos, all values in them got clamped to 1, making the result look much darker than it should be. To fix that, this commit changes it to use the same format as the main framebuffer, ensuring that the range of values that can be stored is the same
This commit is contained in:
parent
47c415c119
commit
fcf24d98bf
1 changed files with 2 additions and 2 deletions
|
@ -441,8 +441,8 @@ void ContrastEffect::doContrast(const RenderTarget &renderTarget, const RenderVi
|
|||
|
||||
Q_ASSERT(m_windowData.contains(w));
|
||||
auto &windowData = m_windowData[w];
|
||||
if (!windowData.texture || windowData.texture->size() != r.size()) {
|
||||
windowData.texture = GLTexture::allocate(GL_RGBA8, r.size().toSize());
|
||||
if (!windowData.texture || (renderTarget.texture() && windowData.texture->internalFormat() != renderTarget.texture()->internalFormat()) || windowData.texture->size() != r.size()) {
|
||||
windowData.texture = GLTexture::allocate(renderTarget.texture() ? renderTarget.texture()->internalFormat() : GL_RGBA8, r.size().toSize());
|
||||
if (!windowData.texture) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue