diff --git a/include/openspace/rendering/stars/renderablestars.h b/include/openspace/rendering/stars/renderablestars.h index 0701e8ce7a..2c091b3b10 100644 --- a/include/openspace/rendering/stars/renderablestars.h +++ b/include/openspace/rendering/stars/renderablestars.h @@ -73,9 +73,6 @@ private: properties::OptionProperty _colorOption; bool _dataIsDirty; - properties::Vec2Property _magnitudeClamp; - properties::FloatProperty _exponentialOffset; - properties::FloatProperty _exponentialDampening; properties::FloatProperty _scaleFactor; ghoul::opengl::ProgramObject* _program; diff --git a/scripts/default_settings.lua b/scripts/default_settings.lua index 173f901dc8..376feeb652 100644 --- a/scripts/default_settings.lua +++ b/scripts/default_settings.lua @@ -1,11 +1,7 @@ openspace.printInfo("Setting default values"); openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false); -openspace.setPropertyValue("Stars.renderable.exponentialDampening", 0.400); -openspace.setPropertyValue("Stars.renderable.exponentialOffset", 19.222); -openspace.setPropertyValue("Stars.renderable.scaleFactor", 9.201); - -openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.85); +openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.75); openspace.setPropertyValue("MilkyWay.renderable.segments", 50); openspace.printInfo("Done setting default values"); \ No newline at end of file diff --git a/scripts/default_settings_michal.lua b/scripts/default_settings_michal.lua deleted file mode 100644 index 7c5fa59a2e..0000000000 --- a/scripts/default_settings_michal.lua +++ /dev/null @@ -1,12 +0,0 @@ -openspace.printInfo("Setting default values"); -openspace.setPropertyValue("Constellation Bounds.renderable.enabled", false); - -openspace.setPropertyValue("Stars.renderable.magnitudeClamp", {0.941, 3.824}); -openspace.setPropertyValue("Stars.renderable.exponentialOffset", 6.180); -openspace.setPropertyValue("Stars.renderable.exponentialDampening", 0.838); -openspace.setPropertyValue("Stars.renderable.scaleFactor", 0.563); - -openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.65); -openspace.setPropertyValue("MilkyWay.renderable.segments", 50); - -openspace.printInfo("Done setting default values"); \ No newline at end of file diff --git a/shaders/modules/stars/star_fs.glsl b/shaders/modules/stars/star_fs.glsl index f30e6d620a..01cd17ecc6 100644 --- a/shaders/modules/stars/star_fs.glsl +++ b/shaders/modules/stars/star_fs.glsl @@ -77,7 +77,7 @@ void main() { // textureColor.a = sqrt(textureColor.a); vec4 fullColor = vec4(color.rgb, textureColor.a); - const float minPixelSize = 15; + const float minPixelSize = 25; float normSize = (billboardSize - 1.0) / (minPixelSize - 1.0); normSize = pow(normSize, 3); diff --git a/shaders/modules/stars/star_ge.glsl b/shaders/modules/stars/star_ge.glsl index 7f6948f8c8..21531f324f 100644 --- a/shaders/modules/stars/star_ge.glsl +++ b/shaders/modules/stars/star_ge.glsl @@ -52,9 +52,6 @@ layout(location = 5) out float billboardSize; uniform mat4 projection; -uniform vec2 magnitudeClamp; -uniform float exponentialOffset; -uniform float exponentialDampening; uniform float scaleFactor; void main() { @@ -63,7 +60,8 @@ void main() { ge_speed = vs_speed[0]; float absoluteMagnitude = vs_brightness[0].z; - float modifiedSpriteSize = exp((-exponentialOffset - absoluteMagnitude) * exponentialDampening) * scaleFactor; + // float modifiedSpriteSize = exp((-exponentialOffset - absoluteMagnitude) * exponentialDampening) * scaleFactor * 50; + float modifiedSpriteSize = exp((-30.623 - absoluteMagnitude) * 0.462) * scaleFactor * 2000; vec4 projPos[4]; for (int i = 0; i < 4; ++i) { @@ -81,7 +79,7 @@ void main() { // The billboard is smaller than one pixel, we can discard it vec2 distance = abs(ll - ur); float sizeInPixels = length(distance); - if (sizeInPixels < 1) + if (sizeInPixels < 5) return; for(int i = 0; i < 4; i++){ diff --git a/src/rendering/stars/renderablestars.cpp b/src/rendering/stars/renderablestars.cpp index 8280780fa1..f6a00f6b37 100644 --- a/src/rendering/stars/renderablestars.cpp +++ b/src/rendering/stars/renderablestars.cpp @@ -87,16 +87,7 @@ RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary) , _colorTextureIsDirty(true) , _colorOption("colorOption", "Color Option") , _dataIsDirty(true) - , _magnitudeClamp( - "magnitudeClamp", - "Magnitude Clamping", - glm::vec2(1.f, 4.f), - glm::vec2(-15.f), - glm::vec2(15.f) - ) - , _exponentialOffset("exponentialOffset", "Exponential Offset", 5.f, 0.f, 50.f) - , _exponentialDampening("exponentialDampening", "Exponential Dampening", 0.871f, 0.f, 1.f) - , _scaleFactor("scaleFactor", "Scale Factor", 1.f, 0.f, 10.f) + , _scaleFactor("scaleFactor", "Scale Factor", 5.f, 0.f, 10.f) , _program(nullptr) , _programIsDirty(false) , _speckFile("") @@ -137,9 +128,6 @@ RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary) _colorTexturePath.onChange([&]{ _colorTextureIsDirty = true; }); _colorTextureFile->setCallback([&](const File&) { _colorTextureIsDirty = true; }); - addProperty(_magnitudeClamp); - addProperty(_exponentialOffset); - addProperty(_exponentialDampening); addProperty(_scaleFactor); } @@ -202,9 +190,6 @@ void RenderableStars::render(const RenderData& data) { _program->setUniform("projection", projectionMatrix); _program->setUniform("colorOption", _colorOption); - _program->setUniform("magnitudeClamp", _magnitudeClamp); - _program->setUniform("exponentialOffset", _exponentialOffset); - _program->setUniform("exponentialDampening", _exponentialDampening); _program->setUniform("scaleFactor", _scaleFactor); setPscUniforms(_program, &data.camera, data.position); @@ -557,9 +542,14 @@ void RenderableStars::createDataSlice(ColorOption option) { layout.value.bvColor = _fullData[i + 3]; layout.value.luminance = _fullData[i + 4]; layout.value.absoluteMagnitude = _fullData[i + 5]; - //layout.value.absoluteMagnitude = _fullData[i + 6]; - _slicedData.insert(_slicedData.end(), +#ifdef USING_STELLAR_TEST_GRID + layout.value.bvColor = _fullData[i + 3]; + layout.value.luminance = _fullData[i + 3]; + layout.value.absoluteMagnitude = _fullData[i + 3]; +#endif + + _slicedData.insert(_slicedData.end(), layout.data.begin(), layout.data.end());