From 2fdcbb1a97b74be66fd6589c68ebddef7839a278 Mon Sep 17 00:00:00 2001 From: Sam Gateau <sam@highfidelity.io> Date: Mon, 5 Jan 2015 16:46:42 -0800 Subject: [PATCH] changing the atmoshpere position --- interface/src/Application.cpp | 2 -- libraries/environment/src/EnvironmentData.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 5620240f01..ecce508acf 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2505,8 +2505,6 @@ void Application::loadViewFrustum(Camera& camera, ViewFrustum& viewFrustum) { } 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 return glm::normalize(_environment.getClosestData(_myCamera.getPosition()).getSunLocation(_myCamera.getPosition())); } diff --git a/libraries/environment/src/EnvironmentData.cpp b/libraries/environment/src/EnvironmentData.cpp index b9b64f72d1..31b3aaa104 100644 --- a/libraries/environment/src/EnvironmentData.cpp +++ b/libraries/environment/src/EnvironmentData.cpp @@ -21,12 +21,12 @@ EnvironmentData::EnvironmentData(int id) : _flat(true), _gravity(0.0f), _atmosphereCenter(0, -1000, 0), - _atmosphereInnerRadius(1000), - _atmosphereOuterRadius(1025), + _atmosphereInnerRadius(1000.0), + _atmosphereOuterRadius(1100.0), _rayleighScattering(0.0025f), _mieScattering(0.0010f), _scatteringWavelengths(0.650f, 0.570f, 0.475f), - _sunLocation(1000, 1000, 0), + _sunLocation(1000, 900, 1000), _sunBrightness(20.0f) { } @@ -35,7 +35,7 @@ glm::vec3 EnvironmentData::getAtmosphereCenter(const glm::vec3& cameraPosition) } 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 {