mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
Reslve merge conflict when syncing with master
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# #
|
||||
# OpenSpace #
|
||||
# #
|
||||
# Copyright (c) 2014-2018 #
|
||||
# Copyright (c) 2014-2020 #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
|
||||
# software and associated documentation files (the "Software"), to deal in the Software #
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -115,58 +115,6 @@ namespace {
|
||||
|
||||
namespace openspace {
|
||||
|
||||
AtmosphereDeferredcaster::AtmosphereDeferredcaster()
|
||||
: _transmittanceProgramObject(nullptr)
|
||||
, _irradianceProgramObject(nullptr)
|
||||
, _irradianceSupTermsProgramObject(nullptr)
|
||||
, _irradianceFinalProgramObject(nullptr)
|
||||
, _inScatteringProgramObject(nullptr)
|
||||
, _inScatteringSupTermsProgramObject(nullptr)
|
||||
, _deltaEProgramObject(nullptr)
|
||||
, _deltaSProgramObject(nullptr)
|
||||
, _deltaSSupTermsProgramObject(nullptr)
|
||||
, _deltaJProgramObject(nullptr)
|
||||
, _atmosphereProgramObject(nullptr)
|
||||
, _transmittanceTableTexture(0)
|
||||
, _irradianceTableTexture(0)
|
||||
, _inScatteringTableTexture(0)
|
||||
, _deltaETableTexture(0)
|
||||
, _deltaSRayleighTableTexture(0)
|
||||
, _deltaSMieTableTexture(0)
|
||||
, _deltaJTableTexture(0)
|
||||
, _atmosphereTexture(0)
|
||||
, _atmosphereCalculated(false)
|
||||
, _ozoneEnabled(false)
|
||||
, _sunFollowingCameraEnabled(false)
|
||||
, _atmosphereRadius(0.f)
|
||||
, _atmospherePlanetRadius(0.f)
|
||||
, _planetAverageGroundReflectance(0.f)
|
||||
, _planetGroundRadianceEmittion(0.f)
|
||||
, _rayleighHeightScale(0.f)
|
||||
, _ozoneHeightScale(0.f)
|
||||
, _mieHeightScale(0.f)
|
||||
, _miePhaseConstant(0.f)
|
||||
, _sunRadianceIntensity(5.f)
|
||||
, _rayleighScatteringCoeff(glm::vec3(0.f))
|
||||
, _ozoneExtinctionCoeff(glm::vec3(0.f))
|
||||
, _mieScatteringCoeff(glm::vec3(0.f))
|
||||
, _mieExtinctionCoeff(glm::vec3(0.f))
|
||||
, _ellipsoidRadii(glm::dvec3(0.0))
|
||||
, _transmittance_table_width(256)
|
||||
, _transmittance_table_height(64)
|
||||
, _irradiance_table_width(64)
|
||||
, _irradiance_table_height(16)
|
||||
, _delta_e_table_width(64)
|
||||
, _delta_e_table_height(16)
|
||||
, _r_samples(32)
|
||||
, _mu_samples(128)
|
||||
, _mu_s_samples(32)
|
||||
, _nu_samples(8)
|
||||
, _hardShadowsEnabled(false)
|
||||
, _calculationTextureScale(1.0)
|
||||
, _saveCalculationTextures(false)
|
||||
{}
|
||||
|
||||
void AtmosphereDeferredcaster::initialize() {
|
||||
if (!_atmosphereCalculated) {
|
||||
preCalculateAtmosphereParam();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -47,7 +47,6 @@ struct ShadowConfiguration;
|
||||
|
||||
class AtmosphereDeferredcaster : public Deferredcaster {
|
||||
public:
|
||||
AtmosphereDeferredcaster();
|
||||
virtual ~AtmosphereDeferredcaster() = default;
|
||||
|
||||
void initialize();
|
||||
@@ -140,61 +139,61 @@ private:
|
||||
hardShadows, transmittanceTexture, irradianceTexture,
|
||||
inscatterTexture) _uniformCache2;
|
||||
|
||||
GLuint _transmittanceTableTexture;
|
||||
GLuint _irradianceTableTexture;
|
||||
GLuint _inScatteringTableTexture;
|
||||
GLuint _deltaETableTexture;
|
||||
GLuint _deltaSRayleighTableTexture;
|
||||
GLuint _deltaSMieTableTexture;
|
||||
GLuint _deltaJTableTexture;
|
||||
GLuint _atmosphereTexture;
|
||||
GLuint _transmittanceTableTexture = 0;
|
||||
GLuint _irradianceTableTexture = 0;
|
||||
GLuint _inScatteringTableTexture = 0;
|
||||
GLuint _deltaETableTexture = 0;
|
||||
GLuint _deltaSRayleighTableTexture = 0;
|
||||
GLuint _deltaSMieTableTexture = 0;
|
||||
GLuint _deltaJTableTexture = 0;
|
||||
GLuint _atmosphereTexture = 0;
|
||||
|
||||
ghoul::opengl::TextureUnit _transmittanceTableTextureUnit;
|
||||
ghoul::opengl::TextureUnit _irradianceTableTextureUnit;
|
||||
ghoul::opengl::TextureUnit _inScatteringTableTextureUnit;
|
||||
|
||||
// Atmosphere Data
|
||||
bool _atmosphereCalculated;
|
||||
bool _ozoneEnabled;
|
||||
bool _sunFollowingCameraEnabled;
|
||||
float _atmosphereRadius;
|
||||
float _atmospherePlanetRadius;
|
||||
float _planetAverageGroundReflectance;
|
||||
float _planetGroundRadianceEmittion;
|
||||
float _rayleighHeightScale;
|
||||
float _ozoneHeightScale;
|
||||
float _mieHeightScale;
|
||||
float _miePhaseConstant;
|
||||
float _sunRadianceIntensity;
|
||||
bool _atmosphereCalculated = false;
|
||||
bool _ozoneEnabled = false;
|
||||
bool _sunFollowingCameraEnabled = false;
|
||||
float _atmosphereRadius = 0.f;
|
||||
float _atmospherePlanetRadius = 0.f;
|
||||
float _planetAverageGroundReflectance = 0.f;
|
||||
float _planetGroundRadianceEmittion = 0.f;
|
||||
float _rayleighHeightScale = 0.f;
|
||||
float _ozoneHeightScale = 0.f;
|
||||
float _mieHeightScale = 0.f;
|
||||
float _miePhaseConstant = 0.f;
|
||||
float _sunRadianceIntensity = 5.f;
|
||||
|
||||
glm::vec3 _rayleighScatteringCoeff;
|
||||
glm::vec3 _ozoneExtinctionCoeff;
|
||||
glm::vec3 _mieScatteringCoeff;
|
||||
glm::vec3 _mieExtinctionCoeff;
|
||||
glm::dvec3 _ellipsoidRadii;
|
||||
glm::vec3 _rayleighScatteringCoeff = glm::vec3(0.f);
|
||||
glm::vec3 _ozoneExtinctionCoeff = glm::vec3(0.f);
|
||||
glm::vec3 _mieScatteringCoeff = glm::vec3(0.f);
|
||||
glm::vec3 _mieExtinctionCoeff = glm::vec3(0.f);
|
||||
glm::dvec3 _ellipsoidRadii = glm::vec3(0.f);
|
||||
|
||||
// Atmosphere Textures Dimmensions
|
||||
int _transmittance_table_width;
|
||||
int _transmittance_table_height;
|
||||
int _irradiance_table_width;
|
||||
int _irradiance_table_height;
|
||||
int _delta_e_table_width;
|
||||
int _delta_e_table_height;
|
||||
int _r_samples;
|
||||
int _mu_samples;
|
||||
int _mu_s_samples;
|
||||
int _nu_samples;
|
||||
int _transmittance_table_width = 256;
|
||||
int _transmittance_table_height = 64;
|
||||
int _irradiance_table_width = 64;
|
||||
int _irradiance_table_height = 16;
|
||||
int _delta_e_table_width = 64;
|
||||
int _delta_e_table_height = 16;
|
||||
int _r_samples = 32;
|
||||
int _mu_samples = 128;
|
||||
int _mu_s_samples = 32;
|
||||
int _nu_samples = 8;
|
||||
|
||||
glm::dmat4 _modelTransform;
|
||||
double _time = 0.0;
|
||||
|
||||
// Eclipse Shadows
|
||||
std::vector<ShadowConfiguration> _shadowConfArray;
|
||||
bool _hardShadowsEnabled;
|
||||
bool _hardShadowsEnabled = false;
|
||||
|
||||
// Atmosphere Debugging
|
||||
float _calculationTextureScale;
|
||||
bool _saveCalculationTextures;
|
||||
float _calculationTextureScale = 1.f;
|
||||
bool _saveCalculationTextures = false;
|
||||
};
|
||||
|
||||
} // openspace
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -254,27 +254,6 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary)
|
||||
, _sunIntensityP(SunIntensityInfo, 50.0f, 0.1f, 1000.0f)
|
||||
, _sunFollowingCameraEnabledP(EnableSunOnCameraPositionInfo, false)
|
||||
, _hardShadowsEnabledP(EclipseHardShadowsInfo, false)
|
||||
, _atmosphereEnabled(false)
|
||||
, _ozoneLayerEnabled(false)
|
||||
, _sunFollowingCameraEnabled(false)
|
||||
, _atmosphereRadius(0.f)
|
||||
, _atmospherePlanetRadius(0.f)
|
||||
, _planetAverageGroundReflectance(0.f)
|
||||
, _planetGroundRadianceEmittion(0.f)
|
||||
, _rayleighHeightScale(0.f)
|
||||
, _ozoneHeightScale(0.f)
|
||||
, _mieHeightScale(0.f)
|
||||
, _miePhaseConstant(0.f)
|
||||
, _sunRadianceIntensity(5.f)
|
||||
, _mieScattExtPropCoefProp(1.f)
|
||||
, _mieExtinctionCoeff(glm::vec3(0.f))
|
||||
, _rayleighScatteringCoeff(glm::vec3(0.f))
|
||||
, _ozoneExtinctionCoeff(glm::vec3(0.f))
|
||||
, _mieScatteringCoeff(glm::vec3(0.f))
|
||||
, _saveCalculationsToTexture(false)
|
||||
, _preCalculatedTexturesScale(1.0)
|
||||
, _shadowEnabled(false)
|
||||
, _hardShadows(false)
|
||||
{
|
||||
ghoul_precondition(
|
||||
dictionary.hasKeyAndValue<std::string>(SceneGraphNode::KeyIdentifier),
|
||||
@@ -433,7 +412,7 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary)
|
||||
|
||||
if (success) {
|
||||
// Not using right now.
|
||||
glm::vec3 rayleighWavelengths;
|
||||
glm::vec3 rayleighWavelengths = glm::vec3(0.f);
|
||||
rayleighDictionary.getValue(
|
||||
"Coefficients.Wavelengths",
|
||||
rayleighWavelengths
|
||||
@@ -452,8 +431,9 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary)
|
||||
}
|
||||
|
||||
if (!rayleighDictionary.getValue(
|
||||
keyRayleighHeightScale,
|
||||
_rayleighHeightScale))
|
||||
keyRayleighHeightScale,
|
||||
_rayleighHeightScale)
|
||||
)
|
||||
{
|
||||
errorReadingAtmosphereData = true;
|
||||
LWARNINGC(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -59,13 +59,13 @@ struct ShadowConfiguration {
|
||||
};
|
||||
|
||||
struct ShadowRenderingStruct {
|
||||
double xu;
|
||||
double xp;
|
||||
double rs;
|
||||
double rc;
|
||||
glm::dvec3 sourceCasterVec;
|
||||
glm::dvec3 casterPositionVec;
|
||||
bool isShadowing;
|
||||
double xu = 0.0;
|
||||
double xp = 0.0;
|
||||
double rs = 0.0;
|
||||
double rc = 0.0;
|
||||
glm::dvec3 sourceCasterVec = glm::dvec3(0.0);
|
||||
glm::dvec3 casterPositionVec = glm::dvec3(0.0);
|
||||
bool isShadowing = false;
|
||||
};
|
||||
|
||||
namespace documentation { struct Documentation; }
|
||||
@@ -110,35 +110,35 @@ private:
|
||||
properties::BoolProperty _sunFollowingCameraEnabledP;
|
||||
properties::BoolProperty _hardShadowsEnabledP;
|
||||
|
||||
bool _atmosphereEnabled;
|
||||
bool _ozoneLayerEnabled;
|
||||
bool _sunFollowingCameraEnabled;
|
||||
float _atmosphereRadius;
|
||||
float _atmospherePlanetRadius;
|
||||
float _planetAverageGroundReflectance;
|
||||
float _planetGroundRadianceEmittion;
|
||||
float _rayleighHeightScale;
|
||||
float _ozoneHeightScale;
|
||||
float _mieHeightScale;
|
||||
float _miePhaseConstant;
|
||||
float _sunRadianceIntensity;
|
||||
float _mieScattExtPropCoefProp;
|
||||
bool _atmosphereEnabled = false;
|
||||
bool _ozoneLayerEnabled = false;
|
||||
bool _sunFollowingCameraEnabled = false;
|
||||
float _atmosphereRadius = 0.f;
|
||||
float _atmospherePlanetRadius = 0.f;
|
||||
float _planetAverageGroundReflectance = 0.f;
|
||||
float _planetGroundRadianceEmittion = 0.f;
|
||||
float _rayleighHeightScale = 0.f;
|
||||
float _ozoneHeightScale = 0.f;
|
||||
float _mieHeightScale = 0.f;
|
||||
float _miePhaseConstant = 0.f;
|
||||
float _sunRadianceIntensity = 5.f;
|
||||
float _mieScattExtPropCoefProp = 1.f;
|
||||
|
||||
glm::vec3 _mieExtinctionCoeff;
|
||||
glm::vec3 _rayleighScatteringCoeff;
|
||||
glm::vec3 _ozoneExtinctionCoeff;
|
||||
glm::vec3 _mieScatteringCoeff;
|
||||
glm::vec3 _mieExtinctionCoeff = glm::vec3(0.f);
|
||||
glm::vec3 _rayleighScatteringCoeff = glm::vec3(0.f);
|
||||
glm::vec3 _ozoneExtinctionCoeff = glm::vec3(0.f);
|
||||
glm::vec3 _mieScatteringCoeff = glm::dvec3(0.f);
|
||||
|
||||
// Atmosphere Debug
|
||||
bool _saveCalculationsToTexture;
|
||||
float _preCalculatedTexturesScale;
|
||||
bool _saveCalculationsToTexture = false;
|
||||
float _preCalculatedTexturesScale = 1.f;
|
||||
|
||||
std::unique_ptr<AtmosphereDeferredcaster> _deferredcaster;
|
||||
|
||||
bool _shadowEnabled;
|
||||
bool _hardShadows;
|
||||
bool _shadowEnabled = false;
|
||||
bool _hardShadows = false;
|
||||
|
||||
glm::dmat3 _stateMatrix;
|
||||
glm::dmat3 _stateMatrix = glm::dmat3(1.0);
|
||||
|
||||
std::vector<ShadowConfiguration> _shadowConfArray;
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -125,7 +125,8 @@ vec3 analyticTransmittance(const float r, const float mu, const float d) {
|
||||
return exp(-betaRayleigh * opticalDepth(HR, r, mu, d) -
|
||||
betaOzoneExtinction * (0.0000006) * opticalDepth(HO, r, mu, d) -
|
||||
betaMieExtinction * opticalDepth(HM, r, mu, d));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return exp(-betaRayleigh * opticalDepth(HR, r, mu, d) -
|
||||
betaMieExtinction * opticalDepth(HM, r, mu, d));
|
||||
}
|
||||
@@ -315,7 +316,8 @@ vec3 transmittance(const float r, const float mu, const float d) {
|
||||
if (mu > 0.0f) {
|
||||
return min(transmittanceLUT(r, mu) /
|
||||
transmittanceLUT(ri, mui), 1.0f);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return min(transmittanceLUT(ri, -mui) /
|
||||
transmittanceLUT(r, -mu), 1.0f);
|
||||
}
|
||||
|
||||
@@ -128,14 +128,16 @@ vec4 calcShadow(const ShadowRenderingStruct shadowInfoArray[numberOfShadows], co
|
||||
if (ground) {
|
||||
if (hardShadows) {
|
||||
return vec4(0.2, 0.2, 0.2, 1.0);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return butterworthFunc(length_d, r_u_pi, 4.0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (hardShadows) {
|
||||
return vec4(0.5, 0.5, 0.5, 1.0);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return vec4(vec3(length_d/r_p_pi), 1.0);
|
||||
}
|
||||
}
|
||||
@@ -143,7 +145,8 @@ vec4 calcShadow(const ShadowRenderingStruct shadowInfoArray[numberOfShadows], co
|
||||
else if ( length_d < r_p_pi ) {// penumbra
|
||||
if (hardShadows) {
|
||||
return vec4(0.5, 0.5, 0.5, 1.0);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return vec4(vec3(length_d/r_p_pi), 1.0);
|
||||
}
|
||||
}
|
||||
@@ -212,7 +215,8 @@ bool dAtmosphereIntersection(const dvec3 planetPosition, const dRay ray, const d
|
||||
inside = false;
|
||||
offset = s - q;
|
||||
maxLength = s + q;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
inside = true;
|
||||
offset = 0.0;
|
||||
maxLength = s + q;
|
||||
@@ -332,7 +336,8 @@ vec3 inscatterRadiance(inout vec3 x, inout float t, inout float irradianceFactor
|
||||
// We set the irradianceFactor to 1.0 so the reflected irradiance will be considered
|
||||
// when calculating the reflected light on the ground.
|
||||
irradianceFactor = 1.0;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
attenuation = analyticTransmittance(r, mu, t);
|
||||
//attenuation = transmittance(r, mu, t);
|
||||
groundHit = false;
|
||||
@@ -412,7 +417,8 @@ vec3 inscatterRadiance(inout vec3 x, inout float t, inout float irradianceFactor
|
||||
|
||||
if (groundHit) {
|
||||
return finalScatteringRadiance;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
//return ((r-Rg) * invRtMinusRg)*spaceColor.rgb + finalScatteringRadiance;
|
||||
return spaceColor.rgb + finalScatteringRadiance;
|
||||
// return attenuation * spaceColor.rgb +
|
||||
@@ -476,7 +482,8 @@ vec3 groundColor(const vec3 x, const float t, const vec3 v, const vec3 s, const
|
||||
vec3 RLStar = (muSun * transmittanceL0 + irradianceReflected) * sunIntensity / M_PI;
|
||||
if (dotNS < 0.05f) {
|
||||
groundRadiance = groundReflectance.rgb * mix(30.0f, 1.0f, smoothstep(-1.0f, 0.05f, dotNS)) * RLStar;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
groundRadiance = groundReflectance.rgb * RLStar;
|
||||
}
|
||||
|
||||
@@ -618,7 +625,8 @@ void main() {
|
||||
if (pixelDepth < offset) {
|
||||
// ATM Occluded - Something in fron of ATM.
|
||||
atmosphereFinalColor += color;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// Following paper nomenclature
|
||||
double t = offset;
|
||||
vec3 attenuation;
|
||||
@@ -658,7 +666,8 @@ void main() {
|
||||
groundColorV = groundColor(x, tF, v, s, r, mu, attenuation,
|
||||
color, normal.xyz, irradianceFactor,
|
||||
normal.a, sunIntensityGround);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// In order to get better performance, we are not tracing
|
||||
// multiple rays per pixel when the ray doesn't intersect
|
||||
// the ground.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -173,7 +173,8 @@ void inscatter(float r, float mu, float muSun, float nu, inout vec3 radianceJ) {
|
||||
|
||||
// Initial InScattering including the phase functions
|
||||
radianceJ1 += singleRay * phaseRaySW + singleMie * phaseMieSW;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// On line 9 of the algorithm, the texture table deltaSR is updated, so when we are not in the first
|
||||
// iteraction, we are getting the updated result of deltaSR (not the single inscattered light but the
|
||||
// accumulated (higher order) inscattered light.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -68,7 +68,8 @@ void integrand(const float r, const float mu, const float muSun, const float nu,
|
||||
if (ozoneLayerEnabled) {
|
||||
S_R = (exp(-(ri - Rg) / HO) + exp( -(ri - Rg) / HR )) * transmittanceY;
|
||||
S_M = exp( -(ri - Rg) / HM ) * transmittanceY;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
S_R = exp( -(ri - Rg) / HR ) * transmittanceY;
|
||||
S_M = exp( -(ri - Rg) / HM ) * transmittanceY;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -78,7 +78,8 @@ void main(void) {
|
||||
vec3 singleMie = texture4D(deltaSMTexture, r, w.z, muSun, nu).rgb;
|
||||
// w.z is the cosine(theta) = mu for vec(w) and also vec(w) dot vec(n(xo))
|
||||
irradianceE += (singleRay * phaseRay + singleMie * phaseMie) * w.z * dw;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// On line 10 of the algorithm, the texture table deltaE is updated, so when we are not in the first
|
||||
// iteraction, we are getting the updated result of deltaE (not the single irradiance light but the
|
||||
// accumulated (higher order) irradiance light.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -82,7 +82,8 @@ void main(void) {
|
||||
opDepth = betaOzoneExtinction * (0.0000006) * opticalDepth(r, muSun, HO) +
|
||||
betaMieExtinction * opticalDepth(r, muSun, HM) +
|
||||
betaRayleigh * opticalDepth(r, muSun, HR);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
opDepth = betaMieExtinction * opticalDepth(r, muSun, HM) +
|
||||
betaRayleigh * opticalDepth(r, muSun, HR);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# #
|
||||
# OpenSpace #
|
||||
# #
|
||||
# Copyright (c) 2014-2018 #
|
||||
# Copyright (c) 2014-2020 #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
|
||||
# software and associated documentation files (the "Software"), to deal in the Software #
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -385,7 +385,7 @@ std::pair<glm::dvec3, std::string> DashboardItemDistance::positionAndLabel(
|
||||
return { mainComp.node->worldPosition(), mainComp.node->guiName() };
|
||||
case Type::NodeSurface:
|
||||
{
|
||||
glm::dvec3 otherPos;
|
||||
glm::dvec3 otherPos = glm::dvec3(0.0);
|
||||
if (otherComp.type == Type::NodeSurface) {
|
||||
// We are only interested in the direction, and we want to prevent
|
||||
// infinite recursion
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -58,7 +58,7 @@ private:
|
||||
properties::BoolProperty _doSimplification;
|
||||
properties::OptionProperty _requestedUnit;
|
||||
|
||||
glm::dvec3 _prevPosition;
|
||||
glm::dvec3 _prevPosition = glm::dvec3(0.0);
|
||||
|
||||
std::shared_ptr<ghoul::fontrendering::Font> _font;
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -265,14 +265,14 @@ void RenderableBoxGrid::update(const UpdateData&) {
|
||||
// 0 -> 1 -> 2 -> 3 -> 0 -> 4 -> 5 -> 6 -> 7 -> 4 -> 5(d) -> 1 -> 2(d) -> 6
|
||||
// -> 7(d) -> 3
|
||||
|
||||
const glm::vec3 v0 = { llf.x, llf.y, llf.z };
|
||||
const glm::vec3 v1 = { urb.x, llf.y, llf.z };
|
||||
const glm::vec3 v2 = { urb.x, urb.y, llf.z };
|
||||
const glm::vec3 v3 = { llf.x, urb.y, llf.z };
|
||||
const glm::vec3 v4 = { llf.x, llf.y, urb.z };
|
||||
const glm::vec3 v5 = { urb.x, llf.y, urb.z };
|
||||
const glm::vec3 v6 = { urb.x, urb.y, urb.z };
|
||||
const glm::vec3 v7 = { llf.x, urb.y, urb.z };
|
||||
const glm::vec3 v0 = glm::vec3(llf.x, llf.y, llf.z);
|
||||
const glm::vec3 v1 = glm::vec3(urb.x, llf.y, llf.z);
|
||||
const glm::vec3 v2 = glm::vec3(urb.x, urb.y, llf.z);
|
||||
const glm::vec3 v3 = glm::vec3(llf.x, urb.y, llf.z);
|
||||
const glm::vec3 v4 = glm::vec3(llf.x, llf.y, urb.z);
|
||||
const glm::vec3 v5 = glm::vec3(urb.x, llf.y, urb.z);
|
||||
const glm::vec3 v6 = glm::vec3(urb.x, urb.y, urb.z);
|
||||
const glm::vec3 v7 = glm::vec3(llf.x, urb.y, urb.z);
|
||||
|
||||
// First add the bounds
|
||||
_varray.push_back({ v0.x, v0.y, v0.z });
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -123,7 +123,7 @@ documentation::Documentation RenderableNodeLine::Documentation() {
|
||||
|
||||
RenderableNodeLine::RenderableNodeLine(const ghoul::Dictionary& dictionary)
|
||||
: Renderable(dictionary)
|
||||
, _lineColor(LineColorInfo, glm::vec3(1.f, 1.f, 1.f), glm::vec3(0.f), glm::vec3(1.f))
|
||||
, _lineColor(LineColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f))
|
||||
, _lineWidth(LineWidthInfo, 2.f, 1.f, 20.f)
|
||||
, _start(StartNodeInfo, Root)
|
||||
, _end(EndNodeInfo, Root)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -76,8 +76,8 @@ private:
|
||||
GLuint _vBufferId = 0;
|
||||
std::vector<float> _vertexArray;
|
||||
|
||||
glm::dvec3 _startPos;
|
||||
glm::dvec3 _endPos;
|
||||
glm::dvec3 _startPos = glm::dvec3(0.0);
|
||||
glm::dvec3 _endPos = glm::dvec3(0.0);
|
||||
|
||||
properties::StringProperty _start;
|
||||
properties::StringProperty _end;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -215,7 +215,7 @@ void RenderablePlane::render(const RenderData& data, RendererTasks&) {
|
||||
);
|
||||
glm::dvec3 newUp = glm::cross(normal, newRight);
|
||||
|
||||
glm::dmat4 cameraOrientedRotation;
|
||||
glm::dmat4 cameraOrientedRotation = glm::dmat4(1.0);
|
||||
cameraOrientedRotation[0] = glm::dvec4(newRight, 0.0);
|
||||
cameraOrientedRotation[1] = glm::dvec4(newUp, 0.0);
|
||||
cameraOrientedRotation[2] = glm::dvec4(normal, 0.0);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -102,7 +102,8 @@ RenderablePlaneImageLocal::RenderablePlaneImageLocal(const ghoul::Dictionary& di
|
||||
);
|
||||
if (renderType == "Background") {
|
||||
setRenderBin(Renderable::RenderBin::Background);
|
||||
} else if (renderType == "Opaque") {
|
||||
}
|
||||
else if (renderType == "Opaque") {
|
||||
setRenderBin(Renderable::RenderBin::Opaque);
|
||||
}
|
||||
else if (renderType == "Transparent") {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -424,7 +424,8 @@ void RenderableSphere::render(const RenderData& data, RendererTasks&) {
|
||||
|
||||
if (orientation == Orientation::Inside) {
|
||||
glCullFace(GL_FRONT);
|
||||
} else if (orientation == Orientation::Both) {
|
||||
}
|
||||
else if (orientation == Orientation::Both) {
|
||||
glDisable(GL_CULL_FACE);
|
||||
}
|
||||
|
||||
@@ -455,7 +456,8 @@ void RenderableSphere::render(const RenderData& data, RendererTasks&) {
|
||||
|
||||
if (orientation == Orientation::Inside) {
|
||||
glCullFace(GL_BACK);
|
||||
} else if (orientation == Orientation::Both) {
|
||||
}
|
||||
else if (orientation == Orientation::Both) {
|
||||
glEnable(GL_CULL_FACE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
@@ -175,7 +175,7 @@ documentation::Documentation RenderableTrail::Documentation() {
|
||||
|
||||
RenderableTrail::Appearance::Appearance()
|
||||
: properties::PropertyOwner(AppearanceInfo)
|
||||
, lineColor(LineColorInfo, glm::vec3(1.0f, 1.0f, 0.f), glm::vec3(0.f), glm::vec3(1.f))
|
||||
, lineColor(LineColorInfo, glm::vec3(1.f), glm::vec3(0.f), glm::vec3(1.f))
|
||||
, useLineFade(EnableFadeInfo, true)
|
||||
, lineFade(FadeInfo, 1.f, 0.f, 30.f)
|
||||
, lineWidth(LineWidthInfo, 10.f, 1.f, 20.f)
|
||||
@@ -249,6 +249,18 @@ RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary)
|
||||
}
|
||||
|
||||
void RenderableTrail::initializeGL() {
|
||||
#ifdef __APPLE__
|
||||
_programObject = BaseModule::ProgramObjectManager.request(
|
||||
ProgramName,
|
||||
[]() -> std::unique_ptr<ghoul::opengl::ProgramObject> {
|
||||
return global::renderEngine.buildRenderProgram(
|
||||
ProgramName,
|
||||
absPath("${MODULE_BASE}/shaders/renderabletrail_apple_vs.glsl"),
|
||||
absPath("${MODULE_BASE}/shaders/renderabletrail_apple_fs.glsl")
|
||||
);
|
||||
}
|
||||
);
|
||||
#else
|
||||
_programObject = BaseModule::ProgramObjectManager.request(
|
||||
ProgramName,
|
||||
[]() -> std::unique_ptr<ghoul::opengl::ProgramObject> {
|
||||
@@ -259,6 +271,7 @@ void RenderableTrail::initializeGL() {
|
||||
);
|
||||
}
|
||||
);
|
||||
#endif
|
||||
|
||||
ghoul::opengl::updateUniformLocations(*_programObject, _uniformCache, UniformNames);
|
||||
}
|
||||
@@ -320,7 +333,11 @@ void RenderableTrail::render(const RenderData& data, RendererTasks&) {
|
||||
(_appearance.renderingModes == RenderingModeLinesPoints);
|
||||
|
||||
if (renderLines) {
|
||||
#ifdef __APPLE__
|
||||
glLineWidth(1.f);
|
||||
#else
|
||||
glLineWidth(ceil((2.f * 1.f + _appearance.lineWidth) * std::sqrt(2.f)));
|
||||
#endif
|
||||
}
|
||||
if (renderPoints) {
|
||||
glEnable(GL_PROGRAM_POINT_SIZE);
|
||||
@@ -349,10 +366,13 @@ void RenderableTrail::render(const RenderData& data, RendererTasks&) {
|
||||
|
||||
p->setUniform(c.nVertices, nVertices);
|
||||
|
||||
glm::ivec2 resolution = global::renderEngine.renderingResolution();
|
||||
p->setUniform(c.resolution, resolution);
|
||||
|
||||
p->setUniform(c.lineWidth, ceil((2.f * 1.f + lw) * std::sqrt(2.f)));
|
||||
#ifndef __APPLE__
|
||||
glm::ivec2 resolution = global::renderEngine.renderingResolution();
|
||||
p->setUniform(c.resolution, resolution);
|
||||
|
||||
p->setUniform(c.lineWidth, ceil((2.f * 1.f + lw) * std::sqrt(2.f)));
|
||||
#endif
|
||||
|
||||
if (renderPoints) {
|
||||
// The stride parameter determines the distance between larger points and
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2019 *
|
||||
* Copyright (c) 2014-2020 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user