mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 11:09:37 -06:00
Normalize surface normal in for Rednerable globe shader and enable water mask and night texture for LodEarth in osirisrex.
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user