From 3818ff38391e94f16bf4f3d5a205c24c8541f530 Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Wed, 8 Nov 2017 12:04:05 -0500 Subject: [PATCH 1/3] Fixed bug in background color for atm. Adding option to enable/disable fade-in effect in DU objects. Updated Ghoul. --- data/scene/default.scene | 12 ++++---- ext/ghoul | 2 +- .../shaders/atmosphere_deferred_fs.glsl | 4 +-- .../rendering/renderablebillboardscloud.cpp | 29 +++++++++++++++---- .../rendering/renderablebillboardscloud.h | 4 ++- .../rendering/renderableplanescloud.cpp | 3 +- 6 files changed, 38 insertions(+), 16 deletions(-) diff --git a/data/scene/default.scene b/data/scene/default.scene index d048f1b28a..af5e57bf67 100644 --- a/data/scene/default.scene +++ b/data/scene/default.scene @@ -128,15 +128,15 @@ return { Modules = { -- # Solar system objects "sun", - --"mercury", - --"venus", + "mercury", + "venus", "earth", "moon", "mars", - --"jupiter", - --"saturn", - --"uranus", - --"neptune", + "jupiter", + "saturn", + "uranus", + "neptune", -- "satellites", "grids", diff --git a/ext/ghoul b/ext/ghoul index e50afc4291..499813d03e 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit e50afc429167fcccc248192281594cd32dc79844 +Subproject commit 499813d03ea98ddd08c9142aef0f674ba0b19a5f diff --git a/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl b/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl index cb8668ecd9..4e83a84619 100644 --- a/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl +++ b/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl @@ -688,8 +688,8 @@ void main() { } } else { // no intersection - //discard; - atmosphereFinalColor += vec4(HDR(color.xyz * backgroundConstant, atmExposure), color.a); + discard; + //atmosphereFinalColor += vec4(HDR(color.xyz * backgroundConstant, atmExposure), color.a); } } diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index 9bfe855f46..5dc76911b8 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -169,8 +169,14 @@ namespace { static const openspace::properties::Property::PropertyInfo FadeInThreshouldInfo = { "FadeInThreshould", "Fade-In Threshould", - "This value determines percentage of the astronomical object is visible before starting " - "fading-in it." + "This value determines distance from the center of our galaxy from which the" + "astronomical object is visible before starting fading-in it." + }; + + static const openspace::properties::Property::PropertyInfo DisableFadeInInfo = { + "DisableFadeIn", + "Disable Fade-in effect", + "Enables/Disables the Fade-in effect." }; } // namespace @@ -284,6 +290,12 @@ documentation::Documentation RenderableBillboardsCloud::Documentation() { Optional::Yes, FadeInThreshouldInfo.description }, + { + DisableFadeInInfo.identifier, + new BoolVerifier, + Optional::Yes, + DisableFadeInInfo.description + }, } }; } @@ -317,6 +329,8 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di , _drawElements(DrawElementsInfo, true) , _drawLabels(DrawLabelInfo, false) , _colorOption(ColorOptionInfo, properties::OptionProperty::DisplayType::Dropdown) + , _fadeInDistance(FadeInThreshouldInfo, 0.0, 0.1, 10.0) + , _disableFadeInDistance(DisableFadeInInfo, false) , _renderOption(RenderOptionInfo, properties::OptionProperty::DisplayType::Dropdown) , _polygonTexture(nullptr) , _spriteTexture(nullptr) @@ -357,6 +371,7 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di _renderOption.addOption(1, "Camera Position Normal"); _renderOption.addOption(2, "Screen center Position Normal"); addProperty(_renderOption); + _renderOption.set(1); if (dictionary.hasKey(keyUnit)) { std::string unit = dictionary.value(keyUnit); @@ -501,8 +516,10 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di } if (dictionary.hasKey(FadeInThreshouldInfo.identifier)) { - _fadeInThreshold = static_cast(dictionary.value(FadeInThreshouldInfo.identifier)); + _fadeInThreshold = static_cast(dictionary.value(FadeInThreshouldInfo.identifier)); } + addProperty(_fadeInDistance); + addProperty(_disableFadeInDistance); } bool RenderableBillboardsCloud::isReady() const { @@ -671,7 +688,7 @@ void RenderableBillboardsCloud::renderBillboards(const RenderData& data, const g } void RenderableBillboardsCloud::renderLabels(const RenderData& data, const glm::dmat4& modelViewProjectionMatrix, - const glm::vec3& orthoRight, const glm::vec3& orthoUp) { + const glm::vec3& orthoRight, const glm::vec3& orthoUp, const float fadeInVariable) { RenderEngine& renderEngine = OsEng.renderEngine(); _fontRenderer->setFramebufferSize(renderEngine.renderingResolution()); @@ -701,6 +718,8 @@ void RenderableBillboardsCloud::renderLabels(const RenderData& data, const glm:: break; } + glm::vec4 textColor = _textColor; + textColor.a *= fadeInVariable; for (const std::pair& pair : _labelData) { //glm::vec3 scaledPos(_transformationMatrix * glm::dvec4(pair.first, 1.0)); glm::vec3 scaledPos(pair.first); @@ -794,7 +813,7 @@ void RenderableBillboardsCloud::render(const RenderData& data, RendererTasks&) { } if (_drawLabels && _hasLabel) { - renderLabels(data, modelViewProjectionMatrix, orthoRight, orthoUp); + renderLabels(data, modelViewProjectionMatrix, orthoRight, orthoUp, fadeInVariable); } } diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.h b/modules/digitaluniverse/rendering/renderablebillboardscloud.h index 12fca1b6cb..8ae9c092dd 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.h +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.h @@ -92,7 +92,7 @@ private: const glm::dmat4& projectionMatrix, const glm::vec3& orthoRight, const glm::vec3& orthoUp, const float fadeInVariable); void renderLabels(const RenderData& data, const glm::dmat4& modelViewProjectionMatrix, - const glm::vec3& orthoRight, const glm::vec3& orthoUp); + const glm::vec3& orthoRight, const glm::vec3& orthoUp, const float fadeInVariable); bool loadData(); bool readSpeckFile(); @@ -125,6 +125,8 @@ private: properties::BoolProperty _drawElements; properties::BoolProperty _drawLabels; properties::OptionProperty _colorOption; + properties::FloatProperty _fadeInDistance; + properties::BoolProperty _disableFadeInDistance; // DEBUG: properties::OptionProperty _renderOption; diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index 7348a150dc..092c2901c4 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -310,6 +310,7 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary _renderOption.addOption(1, "Camera Position Normal"); _renderOption.addOption(2, "Screen center Position Normal"); addProperty(_renderOption); + _renderOption.set(1); if (dictionary.hasKey(keyUnit)) { std::string unit = dictionary.value(keyUnit); @@ -648,7 +649,7 @@ void RenderablePlanesCloud::render(const RenderData& data, RendererTasks&) { float fadeInVariable = 1.0f; if (_fadeInThreshold > 0.0) { - float distCamera = glm::distance(data.camera.positionVec3(), data.position.dvec3()); + float distCamera = glm::length(data.camera.positionVec3()); double term = std::exp(distCamera / scale - _fadeInThreshold); float func = static_cast(term / (term + 1.0)); From 69aa6608854ac9f5fc251347c70b04334c7f130c Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Wed, 8 Nov 2017 16:55:31 -0500 Subject: [PATCH 2/3] Added fade-in/fade-out transitions for Milkyway/Tully galaxies. --- .../digitaluniverse/sloandss/sloandss.mod | 2 +- data/scene/digitaluniverse/tully/tully.mod | 4 +- .../digitaluniverse/digitaluniverse.mod | 2 +- .../shaders/atmosphere_deferred_fs.glsl | 4 +- .../rendering/renderablebillboardscloud.cpp | 27 +++++----- .../rendering/renderablebillboardscloud.h | 4 +- .../rendering/renderableplanescloud.cpp | 54 +++++++++++++------ .../rendering/renderableplanescloud.h | 7 +-- .../digitaluniverse/shaders/plane2_fs.glsl | 4 +- 9 files changed, 65 insertions(+), 43 deletions(-) diff --git a/data/scene/digitaluniverse/sloandss/sloandss.mod b/data/scene/digitaluniverse/sloandss/sloandss.mod index b1b8d0fa9e..25170f6106 100644 --- a/data/scene/digitaluniverse/sloandss/sloandss.mod +++ b/data/scene/digitaluniverse/sloandss/sloandss.mod @@ -15,7 +15,7 @@ return { ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } }, Texture = "textures/point3.png", -- Fade in value in the same unit as "Unit" - FadeInThreshould = 40.0, + FadeInThreshould = 4.7, Unit = "Mpc" }, GuiPath = "/Universe/Galaxies" diff --git a/data/scene/digitaluniverse/tully/tully.mod b/data/scene/digitaluniverse/tully/tully.mod index 26ac703597..304519134d 100644 --- a/data/scene/digitaluniverse/tully/tully.mod +++ b/data/scene/digitaluniverse/tully/tully.mod @@ -25,7 +25,7 @@ return { 0.0, 0.0, 0.0, 1.0 }, -- Fade in value in the same unit as "Unit" - FadeInThreshould = 2.0, + FadeInThreshould = 5.5, Unit = "Mpc" }, GuiPath = "/Universe/Galaxies" @@ -37,7 +37,7 @@ return { Parent = "Root", Renderable = { Type = "RenderablePlanesCloud", - Enabled = false, + Enabled = true, Color = { 1.0, 1.0, 1.0 }, Transparency = 0.99, ScaleFactor = 1.0, diff --git a/data/scene/milkyway/digitaluniverse/digitaluniverse.mod b/data/scene/milkyway/digitaluniverse/digitaluniverse.mod index 93bf016369..0fe219adc3 100644 --- a/data/scene/milkyway/digitaluniverse/digitaluniverse.mod +++ b/data/scene/milkyway/digitaluniverse/digitaluniverse.mod @@ -9,7 +9,7 @@ return { Alpha = 0.4, Texture = "textures/DarkUniverse_mellinger_8k.jpg", Orientation = "Inside/Outside", - FadeOutThreshould = 0.01 + FadeOutThreshould = 0.15 }, GuiPath = "/Milky Way/Milky Way" } diff --git a/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl b/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl index 4e83a84619..cb8668ecd9 100644 --- a/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl +++ b/modules/atmosphere/shaders/atmosphere_deferred_fs.glsl @@ -688,8 +688,8 @@ void main() { } } else { // no intersection - discard; - //atmosphereFinalColor += vec4(HDR(color.xyz * backgroundConstant, atmExposure), color.a); + //discard; + atmosphereFinalColor += vec4(HDR(color.xyz * backgroundConstant, atmExposure), color.a); } } diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index 5dc76911b8..daa3bd2d53 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -329,8 +329,8 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di , _drawElements(DrawElementsInfo, true) , _drawLabels(DrawLabelInfo, false) , _colorOption(ColorOptionInfo, properties::OptionProperty::DisplayType::Dropdown) - , _fadeInDistance(FadeInThreshouldInfo, 0.0, 0.1, 10.0) - , _disableFadeInDistance(DisableFadeInInfo, false) + , _fadeInDistance(FadeInThreshouldInfo, 0.0, 0.1, 100.0) + , _disableFadeInDistance(DisableFadeInInfo, true) , _renderOption(RenderOptionInfo, properties::OptionProperty::DisplayType::Dropdown) , _polygonTexture(nullptr) , _spriteTexture(nullptr) @@ -343,7 +343,6 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di , _colorOptionString("") , _unit(Parsec) , _nValuesPerAstronomicalObject(0) - , _fadeInThreshold(0.0) , _transformationMatrix(glm::dmat4(1.0)) , _vao(0) , _vbo(0) @@ -516,10 +515,12 @@ RenderableBillboardsCloud::RenderableBillboardsCloud(const ghoul::Dictionary& di } if (dictionary.hasKey(FadeInThreshouldInfo.identifier)) { - _fadeInThreshold = static_cast(dictionary.value(FadeInThreshouldInfo.identifier)); - } - addProperty(_fadeInDistance); - addProperty(_disableFadeInDistance); + float fadeInValue = static_cast(dictionary.value(FadeInThreshouldInfo.identifier)); + _fadeInDistance.set(fadeInValue); + _disableFadeInDistance.set(false); + addProperty(_fadeInDistance); + addProperty(_disableFadeInDistance); + } } bool RenderableBillboardsCloud::isReady() const { @@ -727,7 +728,8 @@ void RenderableBillboardsCloud::renderLabels(const RenderData& data, const glm:: _fontRenderer->render( *_font, scaledPos, - _textColor, + //_textColor, + textColor, pow(10.0, _textSize.value()), _textMinSize, modelViewProjectionMatrix, @@ -769,13 +771,14 @@ void RenderableBillboardsCloud::render(const RenderData& data, RendererTasks&) { } float fadeInVariable = 1.0f; - if (_fadeInThreshold > 0.0) { - float distCamera = glm::distance(data.camera.positionVec3(), data.position.dvec3()); - double term = std::exp(distCamera / scale - _fadeInThreshold); + if (!_disableFadeInDistance) { + //float distCamera = glm::distance(data.camera.positionVec3(), data.position.dvec3()); + float distCamera = glm::length(data.camera.positionVec3()); + double term = std::exp(distCamera / scale - _fadeInDistance); float func = static_cast(term / (term + 1.0)); // Let's not waste performance - if (func < 0.001) { + if (func < 0.01) { return; } diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.h b/modules/digitaluniverse/rendering/renderablebillboardscloud.h index 8ae9c092dd..3ac832b910 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.h +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.h @@ -153,9 +153,7 @@ private: std::unordered_map _variableDataPositionMap; std::unordered_map _optionConversionMap; std::vector _colorRangeData; - - float _fadeInThreshold; - + int _nValuesPerAstronomicalObject; glm::dmat4 _transformationMatrix; diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index 092c2901c4..a69a78af0e 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -153,8 +153,14 @@ namespace { static const openspace::properties::Property::PropertyInfo FadeInThreshouldInfo = { "FadeInThreshould", "Fade-In Threshould", - "This value determines percentage of the astronomical object is visible before starting " - "fading-in it." + "This value determines distance from the center of our galaxy from which the" + "astronomical object is visible before starting fading-in it." + }; + + static const openspace::properties::Property::PropertyInfo DisableFadeInInfo = { + "DisableFadeIn", + "Disable Fade-in effect", + "Enables/Disables the Fade-in effect." }; } // namespace @@ -251,6 +257,12 @@ documentation::Documentation RenderablePlanesCloud::Documentation() { Optional::Yes, FadeInThreshouldInfo.description }, + { + DisableFadeInInfo.identifier, + new BoolVerifier, + Optional::Yes, + DisableFadeInInfo.description + }, } }; } @@ -277,6 +289,8 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary , _textSize(TextSizeInfo, 8.0, 0.5, 24.0) , _drawElements(DrawElementsInfo, true) , _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown) + , _fadeInDistance(FadeInThreshouldInfo, 0.0, 0.1, 1000.0) + , _disableFadeInDistance(DisableFadeInInfo, true) , _renderOption(RenderOptionInfo, properties::OptionProperty::DisplayType::Dropdown) , _program(nullptr) , _fontRenderer(nullptr) @@ -288,7 +302,6 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary , _unit(Parsec) , _nValuesPerAstronomicalObject(0) , _sluminosity(1.f) - , _fadeInThreshold(0.0f) , _transformationMatrix(glm::dmat4(1.0)) { documentation::testSpecificationAndThrow( @@ -429,7 +442,11 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary } if (dictionary.hasKey(FadeInThreshouldInfo.identifier)) { - _fadeInThreshold = static_cast(dictionary.value(FadeInThreshouldInfo.identifier)); + float fadeInValue = static_cast(dictionary.value(FadeInThreshouldInfo.identifier)); + _fadeInDistance.set(fadeInValue); + _disableFadeInDistance.set(false); + addProperty(_fadeInDistance); + addProperty(_disableFadeInDistance); } } @@ -569,7 +586,7 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&, } void RenderablePlanesCloud::renderLabels(const RenderData& data, const glm::dmat4& modelViewProjectionMatrix, - const glm::vec3& orthoRight, const glm::vec3& orthoUp) { + const glm::vec3& orthoRight, const glm::vec3& orthoUp, const float fadeInVariable) { RenderEngine& renderEngine = OsEng.renderEngine(); _fontRenderer->setFramebufferSize(renderEngine.renderingResolution()); @@ -599,6 +616,8 @@ void RenderablePlanesCloud::renderLabels(const RenderData& data, const glm::dmat break; } + glm::vec4 textColor = _textColor; + textColor.a *= fadeInVariable; for (const std::pair& pair : _labelData) { //glm::vec3 scaledPos(_transformationMatrix * glm::dvec4(pair.first, 1.0)); glm::vec3 scaledPos(pair.first); @@ -606,7 +625,8 @@ void RenderablePlanesCloud::renderLabels(const RenderData& data, const glm::dmat _fontRenderer->render( *_font, scaledPos, - _textColor, + //_textColor, + textColor, pow(10.0, _textSize.value()), _textMinSize, modelViewProjectionMatrix, @@ -622,7 +642,7 @@ void RenderablePlanesCloud::renderLabels(const RenderData& data, const glm::dmat } void RenderablePlanesCloud::render(const RenderData& data, RendererTasks&) { - float scale = 0.0; + double scale = 0.0; switch (_unit) { case Meter: scale = 1.0; @@ -648,19 +668,19 @@ void RenderablePlanesCloud::render(const RenderData& data, RendererTasks&) { } float fadeInVariable = 1.0f; - if (_fadeInThreshold > 0.0) { - float distCamera = glm::length(data.camera.positionVec3()); - double term = std::exp(distCamera / scale - _fadeInThreshold); - float func = static_cast(term / (term + 1.0)); - + if (!_disableFadeInDistance) { + double distCamera = glm::length(data.camera.positionVec3()); + float funcValue = static_cast((1.0 / double(_fadeInDistance))*(distCamera / scale)); + // Let's not waste performance - if (func < 0.001) { + if (funcValue < 0.01) { return; } - if (!std::isinf(term)) { - fadeInVariable = func; - } + fadeInVariable = funcValue > 1.0 ? 1.0 : funcValue; +/* + std::cout << "==== Distance: " << distCamera << ", fadeInVariable = " + << fadeInVariable << ", func: " << funcValue << " ======" << std::endl;*/ } glm::dmat4 modelMatrix = @@ -687,7 +707,7 @@ void RenderablePlanesCloud::render(const RenderData& data, RendererTasks&) { } if (_hasLabel) { - renderLabels(data, modelViewProjectionMatrix, orthoRight, orthoUp); + renderLabels(data, modelViewProjectionMatrix, orthoRight, orthoUp, fadeInVariable); } } diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.h b/modules/digitaluniverse/rendering/renderableplanescloud.h index 70f8fa3c43..ff232f1b1f 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.h +++ b/modules/digitaluniverse/rendering/renderableplanescloud.h @@ -95,7 +95,7 @@ namespace openspace { void renderPlanes(const RenderData& data, const glm::dmat4& modelViewMatrix, const glm::dmat4& projectionMatrix, const float fadeInVariable); void renderLabels(const RenderData& data, const glm::dmat4& modelViewProjectionMatrix, - const glm::vec3& orthoRight, const glm::vec3& orthoUp); + const glm::vec3& orthoRight, const glm::vec3& orthoUp, const float fadeInVarible); bool loadData(); bool loadTextures(); @@ -120,6 +120,8 @@ namespace openspace { properties::FloatProperty _textSize; properties::BoolProperty _drawElements; properties::OptionProperty _blendMode; + properties::FloatProperty _fadeInDistance; + properties::BoolProperty _disableFadeInDistance; // DEBUG: properties::OptionProperty _renderOption; @@ -144,8 +146,7 @@ namespace openspace { int _nValuesPerAstronomicalObject; float _sluminosity; - float _fadeInThreshold; - + glm::dmat4 _transformationMatrix; std::unordered_map _renderingPlanesMap; diff --git a/modules/digitaluniverse/shaders/plane2_fs.glsl b/modules/digitaluniverse/shaders/plane2_fs.glsl index 1606bb4a88..a5e15c8e8d 100644 --- a/modules/digitaluniverse/shaders/plane2_fs.glsl +++ b/modules/digitaluniverse/shaders/plane2_fs.glsl @@ -45,7 +45,7 @@ Fragment getFragment() { frag.color = texture(galaxyTexture, vs_st); frag.color *= alphaValue; - frag.color.a *= fadeInValue; + frag.color *= fadeInValue; if (frag.color.a == 0.0) { discard; @@ -55,7 +55,7 @@ Fragment getFragment() { // frag.blend = BLEND_MODE_ADDITIVE; // } - frag.color = texture(galaxyTexture, vs_st); + //frag.color = texture(galaxyTexture, vs_st); frag.depth = vs_screenSpaceDepth; frag.gPosition = vec4(1e27, 1e27, 1e27, 1.0); frag.gOtherData = vec4(0.0, 0.0, 0.0, 1.0); From cf2c21fab8b26b761e8f7b41a788084b173df75e Mon Sep 17 00:00:00 2001 From: Jonathas Costa Date: Wed, 8 Nov 2017 17:17:32 -0500 Subject: [PATCH 3/3] Fixed stars labels and added Gaia Stars. --- data/scene/digitaluniverse/starlabels/starlabels.mod | 2 +- data/scene/stars/digitaluniverse/digitaluniverse.mod | 2 +- .../digitaluniverse/rendering/renderablebillboardscloud.cpp | 4 +++- modules/digitaluniverse/rendering/renderableplanescloud.cpp | 3 --- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/data/scene/digitaluniverse/starlabels/starlabels.mod b/data/scene/digitaluniverse/starlabels/starlabels.mod index 560fe19e1b..9b218fba77 100644 --- a/data/scene/digitaluniverse/starlabels/starlabels.mod +++ b/data/scene/digitaluniverse/starlabels/starlabels.mod @@ -8,7 +8,7 @@ return { Enabled = false, Color = { 1.0, 1.0, 1.0 }, Transparency = 0.65, - LabelFile = "speck/stars-new.label", + LabelFile = "speck/stars.label", TextColor = { 0.4, 0.4, 0.4, 1.0 }, DrawLabels = true, TextSize = 14.7, diff --git a/data/scene/stars/digitaluniverse/digitaluniverse.mod b/data/scene/stars/digitaluniverse/digitaluniverse.mod index 56b8877c34..608185c013 100644 --- a/data/scene/stars/digitaluniverse/digitaluniverse.mod +++ b/data/scene/stars/digitaluniverse/digitaluniverse.mod @@ -5,7 +5,7 @@ return { Parent = "Root", Renderable = { Type = "RenderableStars", - File = "speck/stars-new.speck", + File = "speck/stars.speck", Texture = "textures/halo.png", ColorMap = "colorbv.cmap" }, diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index daa3bd2d53..f28da61437 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -912,7 +912,6 @@ void RenderableBillboardsCloud::update(const UpdateData&) { } if (_hasLabel && _labelDataIsDirty) { - _labelDataIsDirty = false; } } @@ -1209,6 +1208,9 @@ bool RenderableBillboardsCloud::readLabelFile() { dummy.clear(); while (str >> dummy) { + if (dummy == "#") { + break; + } label += " " + dummy; dummy.clear(); } diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index a69a78af0e..0d45e191e8 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -678,9 +678,6 @@ void RenderablePlanesCloud::render(const RenderData& data, RendererTasks&) { } fadeInVariable = funcValue > 1.0 ? 1.0 : funcValue; -/* - std::cout << "==== Distance: " << distCamera << ", fadeInVariable = " - << fadeInVariable << ", func: " << funcValue << " ======" << std::endl;*/ } glm::dmat4 modelMatrix =