mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 18:33:09 -05:00
Fix the fragment shader to work with any background color
There now some dither to avoid banding in the gradients.
This commit is contained in:
@ -37,7 +37,7 @@ void YACReaderComicFlow3D::updateImageData()
|
||||
|
||||
// Create QRhiTexture from the loaded image
|
||||
if (m_rhi) {
|
||||
QRhiTexture *texture = m_rhi->newTexture(QRhiTexture::BGRA8, img.size(), 1, QRhiTexture::MipMapped | QRhiTexture::UsedWithGenerateMips);
|
||||
QRhiTexture *texture = m_rhi->newTexture(QRhiTexture::RGBA8, img.size(), 1, QRhiTexture::MipMapped | QRhiTexture::UsedWithGenerateMips);
|
||||
|
||||
if (texture->create()) {
|
||||
PendingTextureUpload upload;
|
||||
@ -168,7 +168,7 @@ QImage ImageLoader3D::loadImage(const QString &fileName)
|
||||
break;
|
||||
}
|
||||
|
||||
return image;
|
||||
return image.convertToFormat(QImage::Format_RGBA8888);
|
||||
}
|
||||
|
||||
ImageLoader3D::ImageLoader3D(YACReaderFlow3D *flow)
|
||||
|
||||
Reference in New Issue
Block a user