Normalize surface normal in for Rednerable globe shader and enable water mask and night texture for LodEarth in osirisrex.

This commit is contained in:
Kalle Bladin
2016-08-29 13:48:05 -04:00
parent 84834f230d
commit e55cbaff8c
3 changed files with 9 additions and 13 deletions

View File

@@ -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")

View File

@@ -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

View File

@@ -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",