mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
Convert projected images instead of swizzling for RenderablePlanetProjection
This commit is contained in:
@@ -645,11 +645,10 @@ void RenderablePlanetProjection::update(const UpdateData& data) {
|
||||
|
||||
void RenderablePlanetProjection::loadProjectionTexture() {
|
||||
_textureProj = nullptr;
|
||||
if (_colorTexturePath.value() != "") {
|
||||
if (_projectionTexturePath.value() != "") {
|
||||
_textureProj = ghoul::io::TextureReader::ref().loadTexture(absPath(_projectionTexturePath));
|
||||
if (_textureProj) {
|
||||
if (_textureProj->format() == ghoul::opengl::Texture::Format::Red)
|
||||
_textureProj->setSwizzleMask({ GL_RED, GL_RED, GL_RED, GL_ONE });
|
||||
ghoul::opengl::convertTextureFormat(ghoul::opengl::Texture::Format::RGB, *_textureProj);
|
||||
_textureProj->uploadTexture();
|
||||
// TODO: AnisotropicMipMap crashes on ATI cards ---abock
|
||||
//_textureProj->setFilter(ghoul::opengl::Texture::FilterMode::AnisotropicMipMap);
|
||||
|
||||
Reference in New Issue
Block a user