opengl: is src is single channel and dest is RGB, swizzle G and B
This commit is contained in:
@@ -539,6 +539,13 @@ void OpenGLRenderer::Blit(QVariant s, ShaderJob job, Texture *destination, Video
|
||||
functions_->glBindTexture(target, tex_id);
|
||||
|
||||
PrepareInputTexture(target, t.interpolation);
|
||||
|
||||
if (texture && texture->channel_count() == 1 && destination_params.channel_count() != 1) {
|
||||
// Interpret this texture as a grayscale texture
|
||||
functions_->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_RED);
|
||||
functions_->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, GL_RED);
|
||||
functions_->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_RED);
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure matrix is set, at least to identity
|
||||
|
||||
Reference in New Issue
Block a user