From 35873f5963791af08a9951624dc96481a71fa1d7 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 13 Nov 2017 16:43:47 -0800 Subject: Clean up on sun and moon --- indra/newview/lltoolgun.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoolgun.cpp') diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index 6c9155be85..6903e69d46 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -107,8 +107,8 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) if (gSavedSettings.getBOOL("MouseSun")) { - gSky.setSunDirection(LLViewerCamera::getInstance()->getAtAxis(), LLVector3(0.f, 0.f, 0.f)); - gSky.setOverrideSun(TRUE); + LLVector3 sunpos = LLViewerCamera::getInstance()->getAtAxis(); + gSky.setSunDirection(sunpos, -sunpos); gSavedSettings.setVector3("SkySunDefaultPosition", LLViewerCamera::getInstance()->getAtAxis()); } -- cgit v1.2.3 From 64302d3000b69b31e72eb6a3bd8a981c80cb88de Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 1 Jun 2018 00:18:36 +0100 Subject: Modify use of sky settings, reduce complexity, and name funcs to indicate coord systems in use. Fix class2 softenLightF shader. --- indra/newview/lltoolgun.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoolgun.cpp') diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index 6903e69d46..fb96804bfa 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -108,7 +108,7 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) if (gSavedSettings.getBOOL("MouseSun")) { LLVector3 sunpos = LLViewerCamera::getInstance()->getAtAxis(); - gSky.setSunDirection(sunpos, -sunpos); + gSky.setSunAndMoonDirectionsCFR(sunpos, -sunpos); gSavedSettings.setVector3("SkySunDefaultPosition", LLViewerCamera::getInstance()->getAtAxis()); } -- cgit v1.2.3 From 507c4921826e73635f6ae31087ab0e6cd1280f43 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 8 Jun 2018 22:22:20 +0100 Subject: Add specific shader for the moon to allow different rendering at day vs night. Add MouseMoon positioning ala MouseSun debug setting and accessors to use it. --- indra/newview/lltoolgun.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/lltoolgun.cpp') diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index fb96804bfa..ee757f2566 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -108,7 +108,14 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) if (gSavedSettings.getBOOL("MouseSun")) { LLVector3 sunpos = LLViewerCamera::getInstance()->getAtAxis(); - gSky.setSunAndMoonDirectionsCFR(sunpos, -sunpos); + gSky.setSunDirectionCFR(sunpos); + gSavedSettings.setVector3("SkySunDefaultPosition", LLViewerCamera::getInstance()->getAtAxis()); + } + + if (gSavedSettings.getBOOL("MouseMoon")) + { + LLVector3 moonpos = LLViewerCamera::getInstance()->getAtAxis(); + gSky.setMoonDirectionCFR(moonpos); gSavedSettings.setVector3("SkySunDefaultPosition", LLViewerCamera::getInstance()->getAtAxis()); } -- cgit v1.2.3 From 2929998982f37221a58b9fa8037748a2e905f4b1 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 6 Nov 2018 19:33:04 +0000 Subject: Move to using a shared deferredUtil object for getting pos/norm from gbuffer. Eliminate 20+ callsites with copy-paste of getPosition and/or getNorm code. Make pipeline use getShadowTarget/releaseShadowTarget consistently. --- indra/newview/lltoolgun.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoolgun.cpp') diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index ee757f2566..9539081f30 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -116,7 +116,7 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) { LLVector3 moonpos = LLViewerCamera::getInstance()->getAtAxis(); gSky.setMoonDirectionCFR(moonpos); - gSavedSettings.setVector3("SkySunDefaultPosition", LLViewerCamera::getInstance()->getAtAxis()); + gSavedSettings.setVector3("SkyMoonDefaultPosition", LLViewerCamera::getInstance()->getAtAxis()); } gViewerWindow->moveCursorToCenter(); -- cgit v1.2.3