Feature/mipmapping (#454)

* Enable mipmapping for textures where it was previously disabled

* Fix mipmapping for renderable projections
This commit is contained in:
Emil Axelsson
2018-01-09 17:52:34 +01:00
committed by GitHub
parent a0218dcbbd
commit 2758b35dec
20 changed files with 84 additions and 55 deletions
+1 -1
View File
@@ -307,7 +307,7 @@ void RenderablePlane::loadTexture() {
// Textures of planets looks much smoother with AnisotropicMipMap rather than
// linear
texture->setFilter(ghoul::opengl::Texture::FilterMode::Linear);
texture->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap);
_texture = std::move(texture);
+1 -1
View File
@@ -394,7 +394,7 @@ void RenderableSphere::loadTexture() {
// linear
// TODO: AnisotropicMipMap crashes on ATI cards ---abock
//texture->setFilter(ghoul::opengl::Texture::FilterMode::AnisotropicMipMap);
texture->setFilter(ghoul::opengl::Texture::FilterMode::Linear);
texture->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap);
_texture = std::move(texture);
}
@@ -183,7 +183,7 @@ void ScreenSpaceFramebuffer::createFramebuffer() {
1
));
_texture->uploadTexture();
_texture->setFilter(ghoul::opengl::Texture::FilterMode::Linear);
_texture->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap);
_framebuffer->attachTexture(_texture.get(), GL_COLOR_ATTACHMENT0);
_framebuffer->deactivate();
}
@@ -120,7 +120,7 @@ void ScreenSpaceImageLocal::update() {
// Textures of planets looks much smoother with AnisotropicMipMap rather than
// linear
texture->setFilter(ghoul::opengl::Texture::FilterMode::Linear);
texture->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap);
_texture = std::move(texture);
_textureIsDirty = false;
@@ -146,7 +146,7 @@ void ScreenSpaceImageOnline::update() {
// Textures of planets looks much smoother with AnisotropicMipMap rather
// than linear
texture->setFilter(ghoul::opengl::Texture::FilterMode::Linear);
texture->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap);
_texture = std::move(texture);
_textureIsDirty = false;