From 3d82173ff03a65a80b26d6b890459c625dc1e130 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 4 Jun 2016 20:33:17 +0200 Subject: [PATCH] Don't set alpha value to 1.0 for all projection images --- data/scene/rosetta/67P/67P.mod | 2 +- modules/newhorizons/shaders/fboPass_fs.glsl | 1 - modules/newhorizons/util/projectioncomponent.cpp | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/scene/rosetta/67P/67P.mod b/data/scene/rosetta/67P/67P.mod index e5c1e2962b..a6ec406f4c 100644 --- a/data/scene/rosetta/67P/67P.mod +++ b/data/scene/rosetta/67P/67P.mod @@ -23,7 +23,7 @@ return { Destination = "GALACTIC" }, Projection = { - Sequence = "rosettaimages2", + Sequence = "rosettaimages", SequenceType = "image-sequence", Observer = "ROSETTA", Target = "CHURYUMOV-GERASIMENKO", diff --git a/modules/newhorizons/shaders/fboPass_fs.glsl b/modules/newhorizons/shaders/fboPass_fs.glsl index 8c4384164b..c9772d724a 100644 --- a/modules/newhorizons/shaders/fboPass_fs.glsl +++ b/modules/newhorizons/shaders/fboPass_fs.glsl @@ -84,6 +84,5 @@ void main() { // The 1-x is in this texture call because of flipped textures // to be fixed soon ---abock color = texture(projectionTexture, vec2(projected.x, 1-projected.y)); - color.a = 1.0; } } \ No newline at end of file diff --git a/modules/newhorizons/util/projectioncomponent.cpp b/modules/newhorizons/util/projectioncomponent.cpp index 5b212223b4..780af31965 100644 --- a/modules/newhorizons/util/projectioncomponent.cpp +++ b/modules/newhorizons/util/projectioncomponent.cpp @@ -290,7 +290,8 @@ std::unique_ptr ProjectionComponent::loadProjectionTextu using ghoul::io::TextureReader; unique_ptr texture = TextureReader::ref().loadTexture(absPath(texturePath)); if (texture) { - ghoul::opengl::convertTextureFormat(ghoul::opengl::Texture::Format::RGB, *texture); + if (texture->format() == Texture::Format::Red) + ghoul::opengl::convertTextureFormat(ghoul::opengl::Texture::Format::RGB, *texture); texture->uploadTexture(); // TODO: AnisotropicMipMap crashes on ATI cards ---abock //_textureProj->setFilter(ghoul::opengl::Texture::FilterMode::AnisotropicMipMap);