mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-20 19:39:17 -05:00
Requested changes for merging. Part II.
This commit is contained in:
@@ -102,7 +102,6 @@ namespace {
|
||||
} // namespace
|
||||
|
||||
namespace openspace {
|
||||
|
||||
AtmosphereDeferredcaster::AtmosphereDeferredcaster()
|
||||
: _transmittanceProgramObject(nullptr)
|
||||
, _irradianceProgramObject(nullptr)
|
||||
@@ -1275,8 +1274,6 @@ namespace openspace {
|
||||
LDEBUG("Ended precalculations for Atmosphere effects...");
|
||||
}
|
||||
|
||||
void AtmosphereDeferredcaster::resetAtmosphereTextures() {}
|
||||
|
||||
void AtmosphereDeferredcaster::createRenderQuad(GLuint* vao, GLuint* vbo, GLfloat size) {
|
||||
glGenVertexArrays(1, vao);
|
||||
glGenBuffers(1, vbo);
|
||||
@@ -1404,10 +1401,10 @@ namespace openspace {
|
||||
|
||||
void AtmosphereDeferredcaster::step3DTexture(
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject>& shaderProg,
|
||||
int layer, bool doCalc)
|
||||
int layer, bool doCalculation)
|
||||
{
|
||||
// See OpenGL redbook 8th Edition page 556 for Layered Rendering
|
||||
if (doCalc) {
|
||||
if (doCalculation) {
|
||||
float earth2 = _atmospherePlanetRadius * _atmospherePlanetRadius;
|
||||
float atm2 = _atmosphereRadius * _atmosphereRadius;
|
||||
float diff = atm2 - earth2;
|
||||
|
||||
@@ -100,10 +100,9 @@ private:
|
||||
void deleteUnusedComputationTextures();
|
||||
void executeCalculations(GLuint quadCalcVAO, GLenum drawBuffers[1],
|
||||
GLsizei vertexSize);
|
||||
void resetAtmosphereTextures();
|
||||
void createRenderQuad(GLuint* vao, GLuint* vbo, GLfloat size);
|
||||
void step3DTexture(std::unique_ptr<ghoul::opengl::ProgramObject>& shaderProg,
|
||||
int layer, bool doCalc = true);
|
||||
int layer, bool doCalculation = true);
|
||||
void checkFrameBufferState(const std::string& codePosition) const;
|
||||
void loadAtmosphereDataIntoShaderProgram(
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> & shaderProg
|
||||
|
||||
@@ -699,8 +699,11 @@ bool RenderableStars::readSpeckFile() {
|
||||
} while (!file.eof());
|
||||
|
||||
// Normalize Luminosity:
|
||||
int luminosityVarColumnPos = 4;
|
||||
for (size_t i = 0; i < _fullData.size(); i += _nValuesPerStar) {
|
||||
_fullData[i + 4] = (_fullData[i + 4] - minLumValue) / (maxLumValue - minLumValue);
|
||||
_fullData[i + luminosityVarColumnPos] =
|
||||
(_fullData[i + luminosityVarColumnPos] - minLumValue) /
|
||||
(maxLumValue - minLumValue);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user