PowerScaling modifications

- Started working on PowerScaling with some initial changes
- Faking the stars by blending with the abuffer
- Changed texture filtering for planets, looks better in my opinion
This commit is contained in:
Jonas Strandstedt
2014-10-03 17:02:31 +02:00
parent e4a8e87098
commit 3cad506b5b
28 changed files with 183 additions and 293 deletions
+4 -7
View File
@@ -123,12 +123,6 @@ void RenderablePlanet::render(const RenderData& data)
// activate shader
_programObject->activate();
// fetch data
psc currentPosition = data.position;
psc campos = data.camera.position();
glm::mat4 camrot = data.camera.viewRotationMatrix();
// PowerScaledScalar scaling = camera->scaling();
PowerScaledScalar scaling = glm::vec2(1, -6);
// scale the planet to appropriate size since the planet is a unit sphere
@@ -179,7 +173,10 @@ void RenderablePlanet::loadTexture()
_texture = ghoul::opengl::loadTexture(absPath(_colorTexturePath));
if (_texture) {
LDEBUG("Loaded texture from '" << absPath(_colorTexturePath) << "'");
_texture->uploadTexture();
_texture->uploadTexture();
// Textures of planets looks much smoother with AnisotropicMipMap rather than linear
_texture->setFilter(ghoul::opengl::Texture::FilterMode::AnisotropicMipMap);
}
}
}