Don't set alpha value to 1.0 for all projection images

This commit is contained in:
Alexander Bock
2016-06-04 20:33:17 +02:00
parent 6362318399
commit 3d82173ff0
3 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ return {
Destination = "GALACTIC"
},
Projection = {
Sequence = "rosettaimages2",
Sequence = "rosettaimages",
SequenceType = "image-sequence",
Observer = "ROSETTA",
Target = "CHURYUMOV-GERASIMENKO",

View File

@@ -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;
}
}

View File

@@ -290,7 +290,8 @@ std::unique_ptr<ghoul::opengl::Texture> ProjectionComponent::loadProjectionTextu
using ghoul::io::TextureReader;
unique_ptr<Texture> 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);