mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Correctly swizzle the textures for ScreenSpaceImage types to allow for 8 bit grayscale images (closes #2330)
This commit is contained in:
@@ -124,6 +124,10 @@ void ScreenSpaceImageLocal::update() {
|
||||
// image is only RGB
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
if (texture->format() == ghoul::opengl::Texture::Format::Red) {
|
||||
texture->setSwizzleMask({ GL_RED, GL_RED, GL_RED, GL_ONE });
|
||||
}
|
||||
|
||||
texture->uploadTexture();
|
||||
texture->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap);
|
||||
texture->purgeFromRAM();
|
||||
|
||||
Reference in New Issue
Block a user