diff --git a/data/scene/osirisrex.scene b/data/scene/osirisrex.scene index 65d1e13774..406a55af52 100644 --- a/data/scene/osirisrex.scene +++ b/data/scene/osirisrex.scene @@ -167,8 +167,9 @@ function postInitialization() openspace.setPropertyValue("MilkyWay.renderable.transparency", 0.55) openspace.setPropertyValue("MilkyWay.renderable.segments", 50) - -- Rotate Osiris Rex model to match the specification in the spice data - openspace.setPropertyValue("OsirisRex.renderable.modelrotation", {90.0, 0.0, 0.0}) + -- Activate night textures and water masks + openspace.setPropertyValue("LodEarth.RenderableGlobe.WaterMasks", {0, 1}); + openspace.setPropertyValue("LodEarth.RenderableGlobe.NightTextures", {0, 1}); openspace.printInfo("Done setting default values") openspace.loadMission("${OPENSPACE_DATA}/scene/osirisrex/osirisrex/osirisrex.mission") diff --git a/modules/globebrowsing/shaders/tilefragcolor.hglsl b/modules/globebrowsing/shaders/tilefragcolor.hglsl index 502f47d3c2..51856dabe8 100644 --- a/modules/globebrowsing/shaders/tilefragcolor.hglsl +++ b/modules/globebrowsing/shaders/tilefragcolor.hglsl @@ -167,8 +167,6 @@ vec4 getTileFragColor(){ #endif // USE_COLORTEXTURE #if USE_WATERMASK - // TODO: Jonathas magic goes here here - // TODO: This function needs more parameters and should update the fragment color for water color = calculateWater( color, fs_uv, @@ -176,15 +174,13 @@ vec4 getTileFragColor(){ WaterMasks, WaterMasksParent1, WaterMasksParent2, - ellipsoidNormalCameraSpace, - lightDirectionCameraSpace, + normalize(ellipsoidNormalCameraSpace), + lightDirectionCameraSpace, // Should already be normalized positionCameraSpace); #endif // USE_WATERMASK #if USE_NIGHTTEXTURE - // TODO: Jonathas magic goes here here - // TODO: This function needs more parameters and should update the fragment color for night texture color = calculateNight( color, fs_uv, @@ -192,13 +188,12 @@ vec4 getTileFragColor(){ NightTextures, NightTexturesParent1, NightTexturesParent2, - ellipsoidNormalCameraSpace, - lightDirectionCameraSpace); + normalize(ellipsoidNormalCameraSpace), + lightDirectionCameraSpace); // Should already be normalized #endif // USE_NIGHTTEXTURE #if USE_ATMOSPHERE - // TODO: Jonathas magic goes here here color = color + vec4(0.5,0.5,1,0) * 0.3; // Just to see something for now #endif // USE_ATMOSPHERE diff --git a/openspace.cfg b/openspace.cfg index 61a05dd721..70414aa5bd 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -7,13 +7,13 @@ return { -- Sets the scene that is to be loaded by OpenSpace. A scene file is a description -- of all entities that will be visible during an instance of OpenSpace - Scene = "${SCENE}/default.scene", + --Scene = "${SCENE}/default.scene", -- Scene = "${SCENE}/globebrowsing.scene", -- Scene = "${SCENE}/rosetta.scene", -- Scene = "${SCENE}/dawn.scene", -- Scene = "${SCENE}/newhorizons.scene", - -- Scene = "${SCENE}/osirisrex.scene", + Scene = "${SCENE}/osirisrex.scene", Paths = { SGCT = "${BASE_PATH}/config/sgct",