mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 06:37:27 +02:00
changing the atmoshpere position
This commit is contained in:
parent
56758759e5
commit
2fdcbb1a97
2 changed files with 4 additions and 6 deletions
|
@ -2505,8 +2505,6 @@ void Application::loadViewFrustum(Camera& camera, ViewFrustum& viewFrustum) {
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 Application::getSunDirection() {
|
glm::vec3 Application::getSunDirection() {
|
||||||
/* return glm::normalize(_environment.getClosestData(_myCamera.getPosition()).getSunLocation(_myCamera.getPosition()) -
|
|
||||||
_myCamera.getPosition());*/
|
|
||||||
// Sun direction is in fact just the location of the sun relative to the origin
|
// Sun direction is in fact just the location of the sun relative to the origin
|
||||||
return glm::normalize(_environment.getClosestData(_myCamera.getPosition()).getSunLocation(_myCamera.getPosition()));
|
return glm::normalize(_environment.getClosestData(_myCamera.getPosition()).getSunLocation(_myCamera.getPosition()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,12 +21,12 @@ EnvironmentData::EnvironmentData(int id) :
|
||||||
_flat(true),
|
_flat(true),
|
||||||
_gravity(0.0f),
|
_gravity(0.0f),
|
||||||
_atmosphereCenter(0, -1000, 0),
|
_atmosphereCenter(0, -1000, 0),
|
||||||
_atmosphereInnerRadius(1000),
|
_atmosphereInnerRadius(1000.0),
|
||||||
_atmosphereOuterRadius(1025),
|
_atmosphereOuterRadius(1100.0),
|
||||||
_rayleighScattering(0.0025f),
|
_rayleighScattering(0.0025f),
|
||||||
_mieScattering(0.0010f),
|
_mieScattering(0.0010f),
|
||||||
_scatteringWavelengths(0.650f, 0.570f, 0.475f),
|
_scatteringWavelengths(0.650f, 0.570f, 0.475f),
|
||||||
_sunLocation(1000, 1000, 0),
|
_sunLocation(1000, 900, 1000),
|
||||||
_sunBrightness(20.0f) {
|
_sunBrightness(20.0f) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ glm::vec3 EnvironmentData::getAtmosphereCenter(const glm::vec3& cameraPosition)
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 EnvironmentData::getSunLocation(const glm::vec3& cameraPosition) const {
|
glm::vec3 EnvironmentData::getSunLocation(const glm::vec3& cameraPosition) const {
|
||||||
return _sunLocation + (_flat ? glm::vec3(cameraPosition.x, 0.0f, cameraPosition.z) : glm::vec3());
|
return _sunLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
int EnvironmentData::getBroadcastData(unsigned char* destinationBuffer) const {
|
int EnvironmentData::getBroadcastData(unsigned char* destinationBuffer) const {
|
||||||
|
|
Loading…
Reference in a new issue