diff --git a/Engine/source/gui/core/guiCanvas.cpp b/Engine/source/gui/core/guiCanvas.cpp index 84fe6e0c2..a3f2344f2 100644 --- a/Engine/source/gui/core/guiCanvas.cpp +++ b/Engine/source/gui/core/guiCanvas.cpp @@ -321,8 +321,11 @@ void GuiCanvas::setWindowTitle(const char *newTitle) mPlatformWindow->setCaption(newTitle); } +CanvasSizeChangeSignal GuiCanvas::smCanvasSizeChangeSignal; + void GuiCanvas::handleResize( WindowId did, S32 width, S32 height ) { + getCanvasSizeChangeSignal().trigger(this); if (Journal::IsPlaying() && mPlatformWindow) { mPlatformWindow->lockSize(false); diff --git a/Engine/source/gui/core/guiCanvas.h b/Engine/source/gui/core/guiCanvas.h index b1444ce32..0a2e44fa5 100644 --- a/Engine/source/gui/core/guiCanvas.h +++ b/Engine/source/gui/core/guiCanvas.h @@ -33,6 +33,10 @@ #include "platform/platformInput.h" #endif +#ifndef _SIGNAL_H_ +#include "core/util/tSignal.h" +#endif + #include "component/interfaces/IProcessInput.h" #include "windowManager/platformWindowMgr.h" #include "gfx/gfxFence.h" @@ -74,6 +78,8 @@ /// screen will be painted normally. If you are making an animated GuiControl /// you need to add your control to the dirty areas of the canvas. /// +class guiCanvas; +typedef Signal CanvasSizeChangeSignal; class GuiCanvas : public GuiControl, public IProcessInput { @@ -183,6 +189,8 @@ protected: virtual void setupFences(); void checkLockMouseMove( const GuiEvent& event ); + //Signal used to let others know this canvas has changed size. + static CanvasSizeChangeSignal smCanvasSizeChangeSignal; GuiControl *mMenuBarCtrl; @@ -200,6 +208,8 @@ public: static void initPersistFields(); + static CanvasSizeChangeSignal& getCanvasSizeChangeSignal() { return smCanvasSizeChangeSignal; } + /// @name Rendering methods /// /// @{ diff --git a/Engine/source/renderInstance/renderPassManager.cpp b/Engine/source/renderInstance/renderPassManager.cpp index 236cccd9b..68daed77e 100644 --- a/Engine/source/renderInstance/renderPassManager.cpp +++ b/Engine/source/renderInstance/renderPassManager.cpp @@ -53,6 +53,7 @@ const RenderInstType RenderPassManager::RIT_ObjectTranslucent("ObjectTranslucent const RenderInstType RenderPassManager::RIT_Decal("Decal"); const RenderInstType RenderPassManager::RIT_Water("Water"); const RenderInstType RenderPassManager::RIT_Foliage("Foliage"); +const RenderInstType RenderPassManager::RIT_VolumetricFog("ObjectVolumetricFog"); const RenderInstType RenderPassManager::RIT_Translucent("Translucent"); const RenderInstType RenderPassManager::RIT_Begin("Begin"); const RenderInstType RenderPassManager::RIT_Custom("Custom"); diff --git a/Engine/source/renderInstance/renderPassManager.h b/Engine/source/renderInstance/renderPassManager.h index b7f72b06c..b192fdb0e 100644 --- a/Engine/source/renderInstance/renderPassManager.h +++ b/Engine/source/renderInstance/renderPassManager.h @@ -110,6 +110,7 @@ public: static const RenderInstType RIT_Decal; static const RenderInstType RIT_Water; static const RenderInstType RIT_Foliage; + static const RenderInstType RIT_VolumetricFog; static const RenderInstType RIT_Translucent; static const RenderInstType RIT_Begin; static const RenderInstType RIT_Custom; diff --git a/Engine/source/renderInstance/renderTranslucentMgr.cpp b/Engine/source/renderInstance/renderTranslucentMgr.cpp index b755e12c9..7ad324a26 100644 --- a/Engine/source/renderInstance/renderTranslucentMgr.cpp +++ b/Engine/source/renderInstance/renderTranslucentMgr.cpp @@ -51,6 +51,7 @@ RenderTranslucentMgr::RenderTranslucentMgr() { notifyType( RenderPassManager::RIT_ObjectTranslucent ); notifyType( RenderPassManager::RIT_Particle ); + notifyType( RenderPassManager::RIT_VolumetricFog); } RenderTranslucentMgr::~RenderTranslucentMgr() @@ -187,6 +188,15 @@ void RenderTranslucentMgr::render( SceneRenderState *state ) j++; continue; } + else if (baseRI->type == RenderPassManager::RIT_VolumetricFog) + { + ObjectRenderInst* objRI = static_cast(baseRI); + objRI->renderDelegate(objRI, state, NULL); + lastVB = NULL; + lastPB = NULL; + j++; + continue; + } else if ( baseRI->type == RenderPassManager::RIT_Particle ) { ParticleRenderInst *ri = static_cast(baseRI); diff --git a/Engine/source/windowManager/platformWindow.cpp b/Engine/source/windowManager/platformWindow.cpp index 8a7ad65fb..b11ac0bb7 100644 --- a/Engine/source/windowManager/platformWindow.cpp +++ b/Engine/source/windowManager/platformWindow.cpp @@ -22,7 +22,7 @@ #include "windowManager/platformWindow.h" - +ScreenResChangeSignal PlatformWindow::smScreenResChangeSignal; //----------------------------------------------------------------------------- void PlatformWindow::setFullscreen( const bool fullscreen ) @@ -48,3 +48,8 @@ bool PlatformWindow::shouldNotTranslate( U32 modifiers, U32 keyCode ) const else return false; } +void PlatformWindow::setVideoMode(const GFXVideoMode &mode) +{ + _setVideoMode(mode); + getScreenResChangeSignal().trigger(this, true); +} \ No newline at end of file diff --git a/Engine/source/windowManager/platformWindow.h b/Engine/source/windowManager/platformWindow.h index 6db7ce423..df1b51595 100644 --- a/Engine/source/windowManager/platformWindow.h +++ b/Engine/source/windowManager/platformWindow.h @@ -28,6 +28,9 @@ #include "core/util/safeDelete.h" #include "windowManager/platformCursorController.h" #include "windowManager/windowInputGenerator.h" +#ifndef _SIGNAL_H_ //Volumetric Fog +#include "core/util/tSignal.h" +#endif //forward decl's class PlatformWindowManager; @@ -35,7 +38,7 @@ class GFXDevice; struct GFXVideoMode; class GFXWindowTarget; class IProcessInput; - +typedef Signal ScreenResChangeSignal; /// Abstract representation of a native OS window. /// /// Every windowing system has its own representations and conventions as @@ -110,7 +113,7 @@ protected: // This controller maps window input (Mouse/Keyboard) to a generic input consumer mWindowInputGenerator = new WindowInputGenerator( this ); } - + static ScreenResChangeSignal smScreenResChangeSignal; public: /// To get rid of a window, just delete it. Make sure the GFXDevice is @@ -158,7 +161,7 @@ public: virtual GFXWindowTarget *getGFXTarget()=0; /// Set the video mode for this window. - virtual void setVideoMode(const GFXVideoMode &mode)=0; + virtual void setVideoMode(const GFXVideoMode &mode); /// Get our current video mode - if the window has been resized, it will /// reflect this. @@ -497,6 +500,7 @@ public: IdleEvent idleEvent; /// @} + static ScreenResChangeSignal& getScreenResChangeSignal() { return smScreenResChangeSignal; } /// Get the platform specific object needed to create or attach an accelerated /// graohics drawing context on or to the window @@ -507,6 +511,7 @@ public: virtual void* getPlatformDrawable() const = 0; protected: virtual void _setFullscreen(const bool fullScreen) {}; + virtual void _setVideoMode(const GFXVideoMode &mode) {}; }; #endif diff --git a/Engine/source/windowManager/win32/win32Window.cpp b/Engine/source/windowManager/win32/win32Window.cpp index 88be80cf1..5c9b8ed11 100644 --- a/Engine/source/windowManager/win32/win32Window.cpp +++ b/Engine/source/windowManager/win32/win32Window.cpp @@ -287,6 +287,8 @@ void Win32Window::setVideoMode( const GFXVideoMode &mode ) mOwningManager->raiseCurtain(); SetForegroundWindow(getHWND()); + + getScreenResChangeSignal().trigger(this, true); } bool Win32Window::clearFullscreen() diff --git a/Templates/Empty/game/art/environment/FogMod_heavy.dds b/Templates/Empty/game/art/environment/FogMod_heavy.dds new file mode 100644 index 000000000..197dd4332 Binary files /dev/null and b/Templates/Empty/game/art/environment/FogMod_heavy.dds differ diff --git a/Templates/Empty/game/art/environment/FogMod_light.dds b/Templates/Empty/game/art/environment/FogMod_light.dds new file mode 100644 index 000000000..d726795fa Binary files /dev/null and b/Templates/Empty/game/art/environment/FogMod_light.dds differ diff --git a/Templates/Empty/game/art/environment/FogMod_med.dds b/Templates/Empty/game/art/environment/FogMod_med.dds new file mode 100644 index 000000000..2b25d3263 Binary files /dev/null and b/Templates/Empty/game/art/environment/FogMod_med.dds differ diff --git a/Templates/Empty/game/art/environment/Fog_Cube.DAE b/Templates/Empty/game/art/environment/Fog_Cube.DAE new file mode 100644 index 000000000..34cad9f48 --- /dev/null +++ b/Templates/Empty/game/art/environment/Fog_Cube.DAE @@ -0,0 +1,177 @@ + + + + + Richard + OpenCOLLADA for 3ds Max; Version: 1.4.1; Revision: exported; Platform: x64; Configuration: Release_Max2011_static + file:///G:/Documents%20and%20Settings/Richard/Mijn%20documenten/3dsmax/scenes/FogVolumes.max + + 2014-08-16T10:10:23 + 2014-08-16T10:10:23 + + Z_UP + + + + + + + + 0 0 0 1 + + + 0.588 0.588 0.588 1 + + + 0.588 0.588 0.588 1 + + + 0.9 0.9 0.9 1 + + + 0 + + + 0 0 0 1 + + + 1 1 1 1 + + + 1 + + + + + + + + 0 + 0 + 0 + 1.5 + 0 + 3 + 1 + 0 + + + 1 + 1 + 0 + 0.1 + 0 + + + + + + + + + + + + + + + -0.85 -1 -0.85 0.85 -0.85 -1 -1 0.85 -0.85 0.85 0.85 -1 -0.85 -1 0.85 1 -0.85 0.85 -1 0.85 0.85 0.85 1 0.85 -1 -0.85 -0.85 -0.85 -0.85 -1 1 -0.85 -0.85 0.85 -1 -0.85 -0.85 1 -0.85 -0.85 0.85 -1 0.85 1 -0.85 1 0.85 -0.85 -0.85 -0.85 1 -1 -0.85 0.85 0.85 -0.85 1 0.85 -1 0.85 -0.85 0.85 1 -0.85 1 0.85 0.85 0.85 1 1 0.85 0.85 + + + + + + + + + + -0.341586 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 0.341586 0.341586 -0.8755788 0.341586 -0.341586 -0.8755788 -0.341586 -0.341586 0.8755786 0.341586 -0.341586 0.8755788 0.341586 0.341586 0.8755788 -0.341586 0.341586 0.8755788 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 -0.341586 0.341586 -0.8755786 0.341586 -0.341586 -0.8755788 0.341586 0.8755786 -0.341586 -0.341586 0.8755788 0.341586 -0.341586 0.8755786 0.341586 0.341586 0.8755788 -0.341586 0.341586 0.341586 0.8755786 -0.341586 -0.341586 0.8755788 -0.341586 -0.341586 0.8755786 0.341586 0.341586 0.8755788 0.341586 -0.8755786 0.341586 -0.341586 -0.8755788 -0.341586 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 0.341586 0.341586 + + + + + + + + + + 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0.07542458 0.07542461 4.99755e-4 0.07542479 0.07542461 4.99547e-4 0.07542455 0.07542461 4.99755e-4 0.07542461 0.9245752 4.99547e-4 0.07542458 0.9245754 4.99755e-4 0.07542458 0.9245754 0.9995003 0.07542455 0.9245754 4.99755e-4 0.07542455 0.9245754 0.9995003 0.9245752 0.07542461 4.99576e-4 0.9245754 0.07542479 4.99547e-4 0.07542458 0.07542461 0.9995003 0.9245752 0.07542461 4.99576e-4 0.9245752 0.07542461 0.9995004 0.9245752 0.9245754 4.99547e-4 0.07542455 0.07542461 0.9995003 0.9245752 0.07542461 0.9995004 0.07542461 0.07542479 0.9995005 0.9245752 0.9245754 4.99576e-4 0.9245752 0.07542461 0.9995005 0.9245752 0.9245754 4.99576e-4 0.07542479 0.9245754 0.9995005 0.9245752 0.9245754 0.9995004 0.9245754 0.9245752 0.9995005 0.9245752 0.9245754 0.9995004 0.9995003 0.07542461 0.07542458 0.9245752 4.99547e-4 0.07542461 0.9245752 4.99547e-4 0.07542461 0.9995003 0.07542461 0.07542458 0.9995003 0.07542461 0.9245754 0.9245752 4.99547e-4 0.9245754 0.9245752 4.99547e-4 0.9245754 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.07542458 0.9245752 0.9995005 0.07542461 0.9995003 0.9245754 0.07542458 0.9245752 0.9995005 0.07542461 0.9995003 0.9245754 0.9245754 0.9245752 0.9995005 0.9245754 0.9995003 0.9245754 0.9245754 0.9245752 0.9995005 0.9245754 0.9995004 0.07542482 0.07542461 0.9995003 0.9245754 0.07542461 0.9245752 0.9995004 0.07542461 0.07542455 0.9995003 0.07542461 4.99606e-4 0.9245752 0.07542461 4.99725e-4 0.07542458 0.07542461 0.07542479 4.99576e-4 0.07542461 0.9245754 4.99755e-4 0.07542461 0.07542458 4.99755e-4 0.9245754 0.9245752 4.99576e-4 0.9245754 0.9995003 0.07542458 0.9245754 0.9995004 0.9245752 0.9245754 0.9245754 0.9995003 0.9245754 0.07542482 0.9995004 0.9245754 4.99755e-4 0.9245754 0.9245754 4.99576e-4 0.07542482 0.9245754 0.9995003 0.07542461 0.07542458 0.9995003 0.9245754 0.07542458 0.9995003 0.9245754 0.07542458 0.9995003 0.07542461 0.07542458 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.9245754 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.9245754 + + + + + + + + + + -0.8644259 0.01841655 0.3300502 -0.8715108 -0.05526615 0.3184382 -0.8644259 0.01841664 -0.3300501 -0.8715108 -0.05526611 -0.3184382 0.8738725 -0.06754867 0.3145678 0.8597026 -0.006149054 -0.3377912 0.8738725 -0.06754874 -0.3145678 0.8597026 -0.006148929 0.3377911 0.883319 -0.2990854 -0.116681 0.8478944 0.3571441 -0.06756432 0.8597026 0.3377913 0.00614921 0.883319 -0.2990854 0.116681 0.2990854 0.883319 -0.116681 -0.3571441 0.8478944 -0.06756432 -0.3377913 0.8597026 0.00614921 0.2990854 0.883319 0.116681 -0.883319 0.2990854 -0.116681 -0.8478944 -0.3571441 -0.06756432 -0.8597026 -0.3377913 0.00614921 -0.883319 0.2990854 0.116681 -0.2990854 -0.883319 -0.116681 0.3571441 -0.8478944 -0.06756432 0.3377913 -0.8597026 0.00614921 -0.2990854 -0.883319 0.116681 0.8360862 -0.3764972 0.1289794 0.7071068 -0.7071068 0 0.7071068 0.7071068 0 0.3764972 0.8360862 0.1289794 -0.3764972 -0.8360862 0.1289794 -0.7071068 -0.7071068 0 -0.7071068 0.7071068 0 -0.8360862 0.3764972 0.1289794 0.8360862 -0.3764971 -0.1289794 0.7071068 -0.7071068 0 0.3764971 0.8360862 -0.1289794 0.7071068 0.7071068 0 -0.3764971 -0.8360862 -0.1289794 -0.7071068 -0.7071068 0 -0.8360862 0.3764971 -0.1289794 -0.7071068 0.7071068 0 -0.376497 0.1289792 0.8360862 -0.3764973 -0.1289798 0.8360861 -0.8833191 -0.2990855 0.1166808 -0.883319 0.2990853 -0.1166812 -0.3764971 0.1289794 -0.8360862 -0.3764972 -0.1289795 -0.8360862 -0.8833191 -0.2990855 -0.1166807 -0.883319 0.2990853 0.1166812 0.883319 -0.2990853 0.1166812 0.8833191 0.2990855 -0.1166807 0.3764971 0.1289797 -0.8360862 0.3764971 -0.1289793 -0.8360862 0.883319 -0.2990853 -0.1166811 0.8833191 0.2990855 0.1166808 0.3764972 0.1289799 0.8360861 0.3764971 -0.128979 0.8360862 0.3764972 0.8360862 0.1289794 0.3764971 0.8360862 -0.1289794 0.8360862 -0.3764971 -0.1289794 0.8360862 -0.3764972 0.1289794 -0.8360862 0.3764972 0.1289794 -0.8360862 0.3764971 -0.1289794 -0.3764972 -0.8360862 0.1289794 -0.3764971 -0.8360862 -0.1289794 + + + + + + + + + + 0.1043954 -0.9396398 0.3258505 -0.06496345 -0.9379679 -0.3405817 0.1043953 -0.9396398 -0.3258505 -0.06496349 -0.937968 0.3405817 0.05187585 -0.9370471 -0.3453283 -0.1307439 -0.939827 -0.3156443 0.05187577 -0.9370471 0.3453283 -0.1307438 -0.939827 0.3156443 0 0.3634471 -0.9316148 -0.196368 0.2889368 -0.9369926 0.1307441 -0.3156442 -0.939827 0 -0.3634471 -0.9316148 -0.3634471 0 -0.9316148 -0.2889368 -0.196368 -0.9369926 0.3156442 0.1307441 -0.939827 0.3634471 0 -0.9316148 0 -0.3634471 -0.9316148 0.196368 -0.2889368 -0.9369926 -0.1307441 0.3156442 -0.939827 0 0.3634471 -0.9316148 0.3634471 0 -0.9316148 0.2889368 0.196368 -0.9369926 -0.3156442 -0.1307441 -0.939827 -0.3634471 0 -0.9316148 0.2608475 0.2608475 -0.9294714 0.6191276 0.6191276 -0.4830755 -0.6191276 0.6191276 -0.4830755 -0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 0.6191276 -0.6191276 -0.4830755 -0.6191276 -0.6191276 -0.4830755 -0.2608475 -0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 -0.6191276 -0.6191276 -0.4830755 0.2608475 -0.2608475 -0.9294714 0.6191276 -0.6191276 -0.4830755 -0.2608475 0.2608475 -0.9294714 -0.6191276 0.6191276 -0.4830755 0.2608475 0.2608475 -0.9294714 0.6191276 0.6191276 -0.4830755 0.2608476 -0.9294715 0.2608473 -0.2608474 -0.9294714 -0.2608479 1.81809e-7 -0.363447 -0.9316149 2.27262e-7 -0.3634472 -0.9316148 0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608477 2.72714e-7 -0.363447 0.9316149 2.72714e-7 -0.3634472 0.9316148 2.72714e-7 -0.3634472 -0.9316148 2.72714e-7 -0.363447 -0.9316149 -0.2608474 -0.9294714 -0.2608478 0.2608476 -0.9294714 0.2608474 1.81809e-7 -0.3634472 0.9316148 2.27262e-7 -0.3634471 0.9316149 -0.2608473 -0.9294714 0.260848 0.2608477 -0.9294715 -0.2608472 -0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608475 0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 -0.2608475 0.2608475 -0.9294714 + + + + + + + + + + + + + + + + + +

9 0 21 0 13 1 25 1 3 2 15 2 3 2 15 2 1 3 13 3 9 0 21 0 16 4 28 4 18 5 30 5 22 6 34 6 22 6 34 6 20 7 32 7 16 4 28 4 0 8 12 8 11 9 23 9 19 10 31 10 19 10 31 10 4 11 16 11 0 8 12 8 10 12 22 12 15 13 27 13 23 14 35 14 23 14 35 14 5 15 17 15 10 12 22 12 14 16 26 16 12 17 24 17 21 18 33 18 21 18 33 18 7 19 19 19 14 16 26 16 2 20 14 20 8 21 20 21 17 22 29 22 17 22 29 22 6 23 18 23 2 20 14 20 0 8 36 24 8 21 20 21 9 0 37 25 1 3 38 26 10 12 39 27 11 9 23 9 2 20 40 28 12 17 24 17 13 1 41 29 3 2 42 30 14 16 43 31 15 13 27 13 4 11 44 32 16 4 45 33 17 22 29 22 5 15 46 34 18 5 47 35 19 10 31 10 6 23 48 36 20 7 49 37 21 18 33 18 7 19 50 38 22 6 51 39 23 14 35 14 9 0 21 0 8 21 52 40 2 20 53 41 2 20 53 41 13 1 25 1 9 0 21 0 13 1 25 1 12 17 54 42 14 16 55 43 14 16 55 43 3 2 15 2 13 1 25 1 3 2 15 2 15 13 56 44 10 12 57 45 10 12 57 45 1 3 13 3 3 2 15 2 1 3 13 3 11 9 58 46 0 8 59 47 0 8 59 47 9 0 21 0 1 3 13 3 16 4 28 4 4 11 60 48 19 10 61 49 19 10 61 49 18 5 30 5 16 4 28 4 18 5 30 5 5 15 62 50 23 14 63 51 23 14 63 51 22 6 34 6 18 5 30 5 22 6 34 6 7 19 64 52 21 18 65 53 21 18 65 53 20 7 32 7 22 6 34 6 20 7 32 7 6 23 66 54 17 22 67 55 17 22 67 55 16 4 28 4 20 7 32 7 11 9 23 9 10 12 68 56 5 15 69 57 5 15 69 57 19 10 31 10 11 9 23 9 4 11 70 58 17 22 29 22 8 21 20 21 8 21 20 21 0 8 71 59 4 11 70 58 15 13 27 13 14 16 72 60 7 19 73 61 7 19 73 61 23 14 35 14 15 13 27 13 12 17 24 17 2 20 74 62 6 23 75 63 6 23 75 63 21 18 33 18 12 17 24 17

+
+
+
+
+ + + + + 0 0 0 + + + + + + + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + +
\ No newline at end of file diff --git a/Templates/Empty/game/art/environment/Fog_Cube.cs b/Templates/Empty/game/art/environment/Fog_Cube.cs new file mode 100644 index 000000000..3c686032c --- /dev/null +++ b/Templates/Empty/game/art/environment/Fog_Cube.cs @@ -0,0 +1,8 @@ + +singleton TSShapeConstructor(Fog_CubeDAE) +{ + baseShape = "./Fog_Cube.DAE"; + lodType = "TrailingNumber"; + neverImport = "env*"; + loadLights = "0"; +}; diff --git a/Templates/Empty/game/core/scripts/client/postFx/glow.cs b/Templates/Empty/game/core/scripts/client/postFx/glow.cs index 3cc946b04..78c46e56d 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/glow.cs +++ b/Templates/Empty/game/core/scripts/client/postFx/glow.cs @@ -106,3 +106,79 @@ singleton PostEffect( GlowPostFx ) target = "$backBuffer"; }; }; + +singleton ShaderData( PFX_VolFogGlowBlurVertShader ) +{ + DXVertexShaderFile = "shaders/common/postFx/glowBlurV.hlsl"; + DXPixelShaderFile = "shaders/common/postFx/VolFogGlowP.hlsl"; + + OGLVertexShaderFile = "shaders/common/postFx/gl/glowBlurV.glsl"; + OGLPixelShaderFile = "shaders/common/postFx/gl/VolFogGlowP.glsl"; + + defines = "BLUR_DIR=float2(0.0,1.0)"; + samplerNames[0] = "$diffuseMap"; + pixVersion = 2.0; +}; +singleton ShaderData( PFX_VolFogGlowBlurHorzShader : PFX_VolFogGlowBlurVertShader ) +{ + DXVertexShaderFile = "shaders/common/postFx/glowBlurV.hlsl"; + DXPixelShaderFile = "shaders/common/postFx/VolFogGlowP.hlsl"; + + OGLVertexShaderFile = "shaders/common/postFx/gl/glowBlurV.glsl"; + OGLPixelShaderFile = "shaders/common/postFx/gl/VolFogGlowP.glsl"; + + defines = "BLUR_DIR=float2(1.0,0.0)"; +}; + +$VolFogGlowPostFx::glowStrength = 0.3; + +singleton PostEffect( VolFogGlowPostFx ) +{ + // Do not allow the glow effect to work in reflection + // passes by default so we don't do the extra drawing. + allowReflectPass = false; + renderTime = "PFXAfterBin"; + renderBin = "FogBin"; + renderPriority = 1; + // First we down sample the glow buffer. + shader = PFX_PassthruShader; + stateBlock = PFX_DefaultStateBlock; + texture[0] = "$backbuffer"; + target = "$outTex"; + targetScale = "0.5 0.5"; + isEnabled = true; + // Blur vertically + new PostEffect() + { + shader = PFX_VolFogGlowBlurVertShader; + stateBlock = PFX_DefaultStateBlock; + internalName = "vert"; + texture[0] = "$inTex"; + target = "$outTex"; + }; + // Blur horizontally + new PostEffect() + { + shader = PFX_VolFogGlowBlurHorzShader; + stateBlock = PFX_DefaultStateBlock; + internalName = "hor"; + texture[0] = "$inTex"; + target = "$outTex"; + }; + // Upsample and combine with the back buffer. + new PostEffect() + { + shader = PFX_PassthruShader; + stateBlock = PFX_GlowCombineStateBlock; + texture[0] = "$inTex"; + target = "$backBuffer"; + }; +}; + +function VolFogGlowPostFx::setShaderConsts( %this ) +{ + %vp=%this-->vert; + %vp.setShaderConst( "$strength", $VolFogGlowPostFx::glowStrength ); + %vp=%this-->hor; + %vp.setShaderConst( "$strength", $VolFogGlowPostFx::glowStrength ); +} \ No newline at end of file diff --git a/Templates/Empty/game/core/scripts/client/postFx/postFxManager.gui.settings.cs b/Templates/Empty/game/core/scripts/client/postFx/postFxManager.gui.settings.cs index d30d2314b..77d664f41 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/postFxManager.gui.settings.cs +++ b/Templates/Empty/game/core/scripts/client/postFx/postFxManager.gui.settings.cs @@ -70,6 +70,7 @@ function PostFXManager::settingsSetEnabled(%this, %bEnablePostFX) postVerbose("% - PostFX Manager - PostFX disabled"); } + VolFogGlowPostFx.disable(); } function PostFXManager::settingsEffectSetEnabled(%this, %sName, %bEnable) diff --git a/Templates/Empty/game/core/scripts/client/renderManager.cs b/Templates/Empty/game/core/scripts/client/renderManager.cs index dcd1628fe..5734bbce6 100644 --- a/Templates/Empty/game/core/scripts/client/renderManager.cs +++ b/Templates/Empty/game/core/scripts/client/renderManager.cs @@ -75,6 +75,8 @@ function initRenderManager() DiffuseRenderPassManager.addManager( new RenderParticleMgr() { renderOrder = 1.35; processAddOrder = 1.35; } ); DiffuseRenderPassManager.addManager( new RenderTranslucentMgr() { renderOrder = 1.4; processAddOrder = 1.4; } ); + DiffuseRenderPassManager.addManager(new RenderObjectMgr(FogBin){ bintype = "ObjectVolumetricFog"; renderOrder = 1.45; processAddOrder = 1.45; } ); + // Note that the GlowPostFx is triggered after this bin. DiffuseRenderPassManager.addManager( new RenderGlowMgr(GlowBin) { renderOrder = 1.5; processAddOrder = 1.5; } ); diff --git a/Templates/Empty/game/scripts/server/VolumetricFog.cs b/Templates/Empty/game/scripts/server/VolumetricFog.cs new file mode 100644 index 000000000..53e03adf3 --- /dev/null +++ b/Templates/Empty/game/scripts/server/VolumetricFog.cs @@ -0,0 +1,106 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +function VolumetricFog::onEnterFog(%this,%obj) +{ + // This method is called whenever the control object (Camera or Player) + // %obj enters the fog area. + + // echo("Control Object " @ %obj @ " enters fog " @ %this); +} + +function VolumetricFog::onLeaveFog(%this,%obj) +{ + // This method is called whenever the control object (Camera or Player) + // %obj leaves the fog area. + + // echo("Control Object " @ %obj @ " left fog " @ %this); +} + +function VolumetricFog::Dissolve(%this,%speed,%delete) +{ + // This method dissolves the fog at speed milliseconds + %this.isBuilding = true; + if (%this.FogDensity > 0) + { + %this.setFogDensity(%this.FogDensity - 0.005); + %this.schedule(%speed,Dissolve,%speed,%delete); + } + else + { + %this.isBuilding = false; + %this.SetFogDensity(0.0); + if (%delete !$= "" && %delete !$="0" && %delete !$="false") + %this.schedule(250,delete); + } +} + +function VolumetricFog::Thicken(%this,%speed, %end_density) +{ + // This method thickens the fog at speed milliseconds to a density of %end_density + + %this.isBuilding = true; + if (%this.FogDensity + 0.005 < %end_density) + { + %this.setFogDensity(%this.FogDensity + 0.005); + %this.schedule(%speed,Thicken,%speed, %end_density); + } + else + { + %this.setFogDensity(%end_density); + %this.isBuilding = false; + } +} + +function GenerateFog(%pos,%scale,%color,%density) +{ + // This function can be used to generate some fog caused by massive gunfire etc. + // Change shape and modulation data to your likings. + + %fog=new VolumetricFog() { + shapeName = "art/environment/Fog_Sphere.dts"; + fogColor = %color; + fogDensity = "0.0"; + ignoreWater = "0"; + MinSize = "250"; + FadeSize = "750"; + texture = "art/environment/FogMod_heavy.dds"; + tiles = "1"; + modStrength = "0.2"; + PrimSpeed = "-0.01 0.04"; + SecSpeed = "0.02 0.02"; + position = %pos; + rotation = "0 0 1 20.354"; + scale = %scale; + canSave = "1"; + canSaveDynamicFields = "1"; + }; + + if (isObject(%fog)) + { + MissionCleanup.add(%fog); + + %fog.Thicken(500,%density); + } + + return %fog; +} \ No newline at end of file diff --git a/Templates/Empty/game/scripts/server/scriptExec.cs b/Templates/Empty/game/scripts/server/scriptExec.cs index f2f2d1f58..77a5d8d27 100644 --- a/Templates/Empty/game/scripts/server/scriptExec.cs +++ b/Templates/Empty/game/scripts/server/scriptExec.cs @@ -22,3 +22,4 @@ // Load up all scripts. This function is called when // a server is constructed. +exec("./VolumetricFog.cs"); \ No newline at end of file diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/VFogP.hlsl b/Templates/Empty/game/shaders/common/VolumetricFog/VFogP.hlsl new file mode 100644 index 000000000..aaadbf479 --- /dev/null +++ b/Templates/Empty/game/shaders/common/VolumetricFog/VFogP.hlsl @@ -0,0 +1,87 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog final pixel shader V2.00 + +#include "shadergen:/autogenConditioners.h" +#include "../torque.hlsl" + +uniform sampler2D prepassTex : register(S0); +uniform sampler2D depthBuffer : register(S1); +uniform sampler2D frontBuffer : register(S2); +uniform sampler2D density : register(S3); + +uniform float accumTime; +uniform float4 fogColor; +uniform float fogDensity; +uniform float preBias; +uniform float textured; +uniform float modstrength; +uniform float4 modspeed;//xy speed layer 1, zw speed layer 2 +uniform float2 viewpoint; +uniform float2 texscale; +uniform float3 ambientColor; +uniform float numtiles; +uniform float fadesize; +uniform float2 PixelSize; + +struct ConnectData +{ + float4 hpos : POSITION; + float4 htpos : TEXCOORD0; + float2 uv0 : TEXCOORD1; +}; + +float4 main( ConnectData IN ) : COLOR0 +{ + float2 uvscreen=((IN.htpos.xy/IN.htpos.w) + 1.0 ) / 2.0; + uvscreen.y = 1.0 - uvscreen.y; + + float obj_test = prepassUncondition( prepassTex, uvscreen).w * preBias; + float depth = tex2D(depthBuffer,uvscreen).r; + float front = tex2D(frontBuffer,uvscreen).r; + + if (depth <= front) + return float4(0,0,0,0); + else if ( obj_test < depth ) + depth = obj_test; + if ( front >= 0.0) + depth -= front; + + float diff = 1.0; + float3 col = fogColor.rgb; + if (textured != 0.0) + { + float2 offset = viewpoint + ((-0.5 + (texscale * uvscreen)) * numtiles); + + float2 mod1 = tex2D(density,(offset + (modspeed.xy*accumTime))).rg; + float2 mod2= tex2D(density,(offset + (modspeed.zw*accumTime))).rg; + diff = (mod2.r + mod1.r) * modstrength; + col *= (2.0 - ((mod1.g + mod2.g) * fadesize))/2.0; + } + + col *= ambientColor; + + float4 resultColor = float4(col, 1.0 - saturate(exp(-fogDensity * depth * diff * fadesize))); + + return hdrEncode(resultColor); +} diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/VFogPreP.hlsl b/Templates/Empty/game/shaders/common/VolumetricFog/VFogPreP.hlsl new file mode 100644 index 000000000..bb06f5f7c --- /dev/null +++ b/Templates/Empty/game/shaders/common/VolumetricFog/VFogPreP.hlsl @@ -0,0 +1,39 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog prepass pixel shader V1.00 + +struct ConnectData +{ + float4 hpos : POSITION; + float4 pos : TEXCOORD0; +}; + +float4 main( ConnectData IN ) : COLOR0 +{ + float OUT; + + clip( IN.pos.w ); + OUT = IN.pos.w; + + return float4(OUT,0,0,1); +} diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/VFogPreV.hlsl b/Templates/Empty/game/shaders/common/VolumetricFog/VFogPreV.hlsl new file mode 100644 index 000000000..2d13cdf01 --- /dev/null +++ b/Templates/Empty/game/shaders/common/VolumetricFog/VFogPreV.hlsl @@ -0,0 +1,46 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog prepass vertex shader V1.00 + +#include "shaders/common/hlslstructs.h" + +struct ConnectData +{ + float4 hpos : POSITION; + float4 pos : TEXCOORD0; +}; + +uniform float4x4 modelView; + +ConnectData main( VertexIn_P IN) +{ + ConnectData OUT; + + float4 inPos = IN.pos; + inPos.w = 1.0; + + OUT.hpos = mul( modelView, inPos ); + OUT.pos = OUT.hpos; + + return OUT; +} diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/VFogRefl.hlsl b/Templates/Empty/game/shaders/common/VolumetricFog/VFogRefl.hlsl new file mode 100644 index 000000000..87226a1ac --- /dev/null +++ b/Templates/Empty/game/shaders/common/VolumetricFog/VFogRefl.hlsl @@ -0,0 +1,36 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +uniform float4 fogColor; +uniform float fogDensity; +uniform float reflStrength; + +struct ConnectData +{ + float4 hpos : POSITION; + float4 pos : TEXCOORD0; +}; + +float4 main( ConnectData IN ) : COLOR0 +{ + return float4(fogColor.rgb,saturate(fogDensity*reflStrength)); +} diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/VFogV.hlsl b/Templates/Empty/game/shaders/common/VolumetricFog/VFogV.hlsl new file mode 100644 index 000000000..7f86802b5 --- /dev/null +++ b/Templates/Empty/game/shaders/common/VolumetricFog/VFogV.hlsl @@ -0,0 +1,45 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog final vertex shader V1.00 + +#include "shaders/common/hlslstructs.h" + +struct ConnectData +{ + float4 hpos : POSITION; + float4 htpos : TEXCOORD0; + float2 uv0 : TEXCOORD1; +}; + +uniform float4x4 modelView; + +ConnectData main( VertexIn_PNT IN) +{ + ConnectData OUT; + + OUT.hpos = mul(modelView, IN.pos); + OUT.htpos = OUT.hpos; + OUT.uv0 = IN.uv0; + + return OUT; +} diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogP.glsl b/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogP.glsl new file mode 100644 index 000000000..7895d9e2d --- /dev/null +++ b/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogP.glsl @@ -0,0 +1,87 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#include "../../gl/hlslCompat.glsl" +#include "shadergen:/autogenConditioners.h" +#include "../../gl/torque.glsl" + +uniform sampler2D prepassTex; +uniform sampler2D depthBuffer; +uniform sampler2D frontBuffer; +uniform sampler2D density; + +uniform float accumTime; +uniform vec4 fogColor; +uniform float fogDensity; +uniform float preBias; +uniform float textured; +uniform float modstrength; +uniform vec4 modspeed;//xy speed layer 1, zw speed layer 2 +uniform vec2 viewpoint; +uniform vec2 texscale; +uniform vec3 ambientColor; +uniform float numtiles; +uniform float fadesize; +uniform vec2 PixelSize; + +in vec4 _hpos; +#define IN_hpos _hpos +out vec4 OUT_col; + +void main() +{ + vec2 uvscreen=((IN_hpos.xy/IN_hpos.w) + 1.0 ) / 2.0; + uvscreen.y = 1.0 - uvscreen.y; + + float obj_test = prepassUncondition( prepassTex, uvscreen).w * preBias; + float depth = tex2D(depthBuffer,uvscreen).r; + float front = tex2D(frontBuffer,uvscreen).r; + + if (depth <= front) + { + OUT_col = vec4(0,0,0,0); + return; + } + + else if ( obj_test < depth ) + depth = obj_test; + if ( front >= 0.0) + depth -= front; + + float diff = 1.0; + vec3 col = fogColor.rgb; + if (textured != 0.0) + { + vec2 offset = viewpoint + ((-0.5 + (texscale * uvscreen)) * numtiles); + + vec2 mod1 = tex2D(density,(offset + (modspeed.xy*accumTime))).rg; + vec2 mod2= tex2D(density,(offset + (modspeed.zw*accumTime))).rg; + diff = (mod2.r + mod1.r) * modstrength; + col *= (2.0 - ((mod1.g + mod2.g) * fadesize))/2.0; + } + + col *= ambientColor; + + vec4 returnColor = vec4(col, 1.0 - saturate(exp(-fogDensity * depth * diff * fadesize))); + + OUT_col = hdrEncode(returnColor); +} diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogPreP.glsl b/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogPreP.glsl new file mode 100644 index 000000000..017ea6ef8 --- /dev/null +++ b/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogPreP.glsl @@ -0,0 +1,37 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#include "../../gl/hlslCompat.glsl" + +in vec4 _hpos; +#define IN_hpos _hpos + +out vec4 OUT_col; + +void main() +{ + float OUT; + clip( IN_hpos.w ); + OUT = IN_hpos.w; + + OUT_col = vec4(OUT,0,0,1); +} diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogPreV.glsl b/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogPreV.glsl new file mode 100644 index 000000000..2f2a1318a --- /dev/null +++ b/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogPreV.glsl @@ -0,0 +1,42 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#include "../../gl/hlslCompat.glsl" + +in vec4 vPosition; +#define IN_position vPosition + +out vec4 _hpos; +#define OUT_hpos _hpos + +uniform mat4 modelView; + +void main() +{ + vec4 inPos = IN_position; + inPos.w = 1.0; + + OUT_hpos = tMul( modelView, inPos ); + + gl_Position = OUT_hpos; + correctSSP(gl_Position); +} diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogRefl.glsl b/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogRefl.glsl new file mode 100644 index 000000000..78e149fbf --- /dev/null +++ b/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogRefl.glsl @@ -0,0 +1,33 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#include "../../gl/hlslCompat.glsl" + +uniform vec4 fogColor; +uniform float fogDensity; +uniform float reflStrength; +out vec4 OUT_col; + +void main() +{ + OUT_col = vec4(fogColor.rgb,saturate(fogDensity*reflStrength)); +} diff --git a/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogV.glsl b/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogV.glsl new file mode 100644 index 000000000..57b3ba87e --- /dev/null +++ b/Templates/Empty/game/shaders/common/VolumetricFog/gl/VFogV.glsl @@ -0,0 +1,38 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#include "../../gl/hlslCompat.glsl" + +in vec4 vPosition; +#define IN_position vPosition + +out vec4 _hpos; +#define OUT_hpos _hpos + +uniform mat4 modelView; + +void main() +{ + OUT_hpos = tMul(modelView, IN_position); + gl_Position = OUT_hpos; + correctSSP(gl_Position); +} diff --git a/Templates/Empty/game/shaders/common/postFx/VolFogGlowP.hlsl b/Templates/Empty/game/shaders/common/postFx/VolFogGlowP.hlsl new file mode 100644 index 000000000..8a61b5928 --- /dev/null +++ b/Templates/Empty/game/shaders/common/postFx/VolFogGlowP.hlsl @@ -0,0 +1,74 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2014 R.G.S. - Richards Game Studio, the Netherlands +// http://www.richardsgamestudio.com/ +// +// If you find this code useful or you are feeling particularly generous I +// would ask that you please go to http://www.richardsgamestudio.com/ then +// choose Donations from the menu on the left side and make a donation to +// Richards Game Studio. It will be highly appreciated. +// +// The MIT License: +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog Glow postFx pixel shader V1.00 + +#include "./postFx.hlsl" + +uniform sampler2D diffuseMap : register(S0); +uniform float strength; + +struct VertToPix +{ + float4 hpos : POSITION; + + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; +}; + +float4 main( VertToPix IN ) : COLOR +{ + float4 kernel = float4( 0.175, 0.275, 0.375, 0.475 ) * strength; + + float4 OUT = 0; + OUT += tex2D( diffuseMap, IN.uv0 ) * kernel.x; + OUT += tex2D( diffuseMap, IN.uv1 ) * kernel.y; + OUT += tex2D( diffuseMap, IN.uv2 ) * kernel.z; + OUT += tex2D( diffuseMap, IN.uv3 ) * kernel.w; + + OUT += tex2D( diffuseMap, IN.uv4 ) * kernel.x; + OUT += tex2D( diffuseMap, IN.uv5 ) * kernel.y; + OUT += tex2D( diffuseMap, IN.uv6 ) * kernel.z; + OUT += tex2D( diffuseMap, IN.uv7 ) * kernel.w; + + // Calculate a lumenance value in the alpha so we + // can use alpha test to save fillrate. + float3 rgb2lum = float3( 0.30, 0.59, 0.11 ); + OUT.a = dot( OUT.rgb, rgb2lum ); + + return OUT; +} diff --git a/Templates/Empty/game/shaders/common/postFx/gl/VolFogGlowP.glsl b/Templates/Empty/game/shaders/common/postFx/gl/VolFogGlowP.glsl new file mode 100644 index 000000000..01b072dd9 --- /dev/null +++ b/Templates/Empty/game/shaders/common/postFx/gl/VolFogGlowP.glsl @@ -0,0 +1,67 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2014 R.G.S. - Richards Game Studio, the Netherlands +// http://www.richardsgamestudio.com/ +// +// If you find this code useful or you are feeling particularly generous I +// would ask that you please go to http://www.richardsgamestudio.com/ then +// choose Donations from the menu on the left side and make a donation to +// Richards Game Studio. It will be highly appreciated. +// +// The MIT License: +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog Glow postFx pixel shader V1.00 + +uniform sampler2D diffuseMap; +uniform float strength; + +out vec4 OUT_col; + +in vec2 uv0; +in vec2 uv1; +in vec2 uv2; +in vec2 uv3; + +in vec2 uv4; +in vec2 uv5; +in vec2 uv6; +in vec2 uv7; + +void main() +{ + vec4 kernel = vec4( 0.175, 0.275, 0.375, 0.475 ) * strength; + + OUT_col = vec4(0); + OUT_col += texture( diffuseMap, uv0 ) * kernel.x; + OUT_col += texture( diffuseMap, uv1 ) * kernel.y; + OUT_col += texture( diffuseMap, uv2 ) * kernel.z; + OUT_col += texture( diffuseMap, uv3 ) * kernel.w; + + OUT_col += texture( diffuseMap, uv4 ) * kernel.x; + OUT_col += texture( diffuseMap, uv5 ) * kernel.y; + OUT_col += texture( diffuseMap, uv6 ) * kernel.z; + OUT_col += texture( diffuseMap, uv7 ) * kernel.w; + + // Calculate a lumenance value in the alpha so we + // can use alpha test to save fillrate. + vec3 rgb2lum = vec3( 0.30, 0.59, 0.11 ); + OUT_col.a = dot( OUT_col.rgb, rgb2lum ); +} diff --git a/Templates/Empty/game/tools/classIcons/VolumetricFog.png b/Templates/Empty/game/tools/classIcons/VolumetricFog.png new file mode 100644 index 000000000..5dc516cb5 Binary files /dev/null and b/Templates/Empty/game/tools/classIcons/VolumetricFog.png differ diff --git a/Templates/Empty/game/tools/worldEditor/gui/objectBuilderGui.ed.gui b/Templates/Empty/game/tools/worldEditor/gui/objectBuilderGui.ed.gui index ddf2ef68a..74f1200c6 100644 --- a/Templates/Empty/game/tools/worldEditor/gui/objectBuilderGui.ed.gui +++ b/Templates/Empty/game/tools/worldEditor/gui/objectBuilderGui.ed.gui @@ -980,7 +980,19 @@ function ObjectBuilderGui::buildObserverDropPoint(%this) //------------------------------------------------------------------------------ // System //------------------------------------------------------------------------------ - +function ObjectBuilderGui::buildVolumetricFog(%this) +{ + // Change this if you want to default to another Folder + // Otherwise every time you want to add a Fog you will go this. + %defShape = "/art/environment/Fog_Cube.dts"; + %this.lastPath=getMainDotCsDir() @ %defShape; + OBObjectName.setValue( "" ); + %this.objectClassName = "VolumetricFog"; + %this.addField( "shapeName", "TypeFile", "Shape (Fog volume)", "", "*.dts;*.dae"); + %this.addField("Scale", "TypePoint3", "Scale", "1 1 1"); + %this.addField("FogColor", "TypeColorI", "FogColor", "200 200 200 255"); + %this.process(); +} function ObjectBuilderGui::buildPhysicsEntity(%this) { %this.objectClassName = "PhysicsEntity"; diff --git a/Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs b/Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs index 9bc2cab15..dc5d7f991 100644 --- a/Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs +++ b/Templates/Empty/game/tools/worldEditor/scripts/editors/creator.ed.cs @@ -46,6 +46,7 @@ function EWCreatorWindow::init( %this ) %this.registerMissionObject( "SFXEmitter", "Sound Emitter" ); %this.registerMissionObject( "Precipitation" ); %this.registerMissionObject( "ParticleEmitterNode", "Particle Emitter" ); + %this.registerMissionObject( "VolumetricFog", "Volumetric Fog" ); %this.registerMissionObject( "RibbonNode", "Ribbon" ); // Legacy features. Users should use Ground Cover and the Forest Editor. diff --git a/Templates/Full/game/art/environment/FogMod_heavy.dds b/Templates/Full/game/art/environment/FogMod_heavy.dds new file mode 100644 index 000000000..197dd4332 Binary files /dev/null and b/Templates/Full/game/art/environment/FogMod_heavy.dds differ diff --git a/Templates/Full/game/art/environment/FogMod_light.dds b/Templates/Full/game/art/environment/FogMod_light.dds new file mode 100644 index 000000000..d726795fa Binary files /dev/null and b/Templates/Full/game/art/environment/FogMod_light.dds differ diff --git a/Templates/Full/game/art/environment/FogMod_med.dds b/Templates/Full/game/art/environment/FogMod_med.dds new file mode 100644 index 000000000..2b25d3263 Binary files /dev/null and b/Templates/Full/game/art/environment/FogMod_med.dds differ diff --git a/Templates/Full/game/art/environment/Fog_Cube.DAE b/Templates/Full/game/art/environment/Fog_Cube.DAE new file mode 100644 index 000000000..34cad9f48 --- /dev/null +++ b/Templates/Full/game/art/environment/Fog_Cube.DAE @@ -0,0 +1,177 @@ + + + + + Richard + OpenCOLLADA for 3ds Max; Version: 1.4.1; Revision: exported; Platform: x64; Configuration: Release_Max2011_static + file:///G:/Documents%20and%20Settings/Richard/Mijn%20documenten/3dsmax/scenes/FogVolumes.max + + 2014-08-16T10:10:23 + 2014-08-16T10:10:23 + + Z_UP + + + + + + + + 0 0 0 1 + + + 0.588 0.588 0.588 1 + + + 0.588 0.588 0.588 1 + + + 0.9 0.9 0.9 1 + + + 0 + + + 0 0 0 1 + + + 1 1 1 1 + + + 1 + + + + + + + + 0 + 0 + 0 + 1.5 + 0 + 3 + 1 + 0 + + + 1 + 1 + 0 + 0.1 + 0 + + + + + + + + + + + + + + + -0.85 -1 -0.85 0.85 -0.85 -1 -1 0.85 -0.85 0.85 0.85 -1 -0.85 -1 0.85 1 -0.85 0.85 -1 0.85 0.85 0.85 1 0.85 -1 -0.85 -0.85 -0.85 -0.85 -1 1 -0.85 -0.85 0.85 -1 -0.85 -0.85 1 -0.85 -0.85 0.85 -1 0.85 1 -0.85 1 0.85 -0.85 -0.85 -0.85 1 -1 -0.85 0.85 0.85 -0.85 1 0.85 -1 0.85 -0.85 0.85 1 -0.85 1 0.85 0.85 0.85 1 1 0.85 0.85 + + + + + + + + + + -0.341586 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 0.341586 0.341586 -0.8755788 0.341586 -0.341586 -0.8755788 -0.341586 -0.341586 0.8755786 0.341586 -0.341586 0.8755788 0.341586 0.341586 0.8755788 -0.341586 0.341586 0.8755788 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 -0.341586 0.341586 -0.8755786 0.341586 -0.341586 -0.8755788 0.341586 0.8755786 -0.341586 -0.341586 0.8755788 0.341586 -0.341586 0.8755786 0.341586 0.341586 0.8755788 -0.341586 0.341586 0.341586 0.8755786 -0.341586 -0.341586 0.8755788 -0.341586 -0.341586 0.8755786 0.341586 0.341586 0.8755788 0.341586 -0.8755786 0.341586 -0.341586 -0.8755788 -0.341586 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 0.341586 0.341586 + + + + + + + + + + 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0.07542458 0.07542461 4.99755e-4 0.07542479 0.07542461 4.99547e-4 0.07542455 0.07542461 4.99755e-4 0.07542461 0.9245752 4.99547e-4 0.07542458 0.9245754 4.99755e-4 0.07542458 0.9245754 0.9995003 0.07542455 0.9245754 4.99755e-4 0.07542455 0.9245754 0.9995003 0.9245752 0.07542461 4.99576e-4 0.9245754 0.07542479 4.99547e-4 0.07542458 0.07542461 0.9995003 0.9245752 0.07542461 4.99576e-4 0.9245752 0.07542461 0.9995004 0.9245752 0.9245754 4.99547e-4 0.07542455 0.07542461 0.9995003 0.9245752 0.07542461 0.9995004 0.07542461 0.07542479 0.9995005 0.9245752 0.9245754 4.99576e-4 0.9245752 0.07542461 0.9995005 0.9245752 0.9245754 4.99576e-4 0.07542479 0.9245754 0.9995005 0.9245752 0.9245754 0.9995004 0.9245754 0.9245752 0.9995005 0.9245752 0.9245754 0.9995004 0.9995003 0.07542461 0.07542458 0.9245752 4.99547e-4 0.07542461 0.9245752 4.99547e-4 0.07542461 0.9995003 0.07542461 0.07542458 0.9995003 0.07542461 0.9245754 0.9245752 4.99547e-4 0.9245754 0.9245752 4.99547e-4 0.9245754 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.07542458 0.9245752 0.9995005 0.07542461 0.9995003 0.9245754 0.07542458 0.9245752 0.9995005 0.07542461 0.9995003 0.9245754 0.9245754 0.9245752 0.9995005 0.9245754 0.9995003 0.9245754 0.9245754 0.9245752 0.9995005 0.9245754 0.9995004 0.07542482 0.07542461 0.9995003 0.9245754 0.07542461 0.9245752 0.9995004 0.07542461 0.07542455 0.9995003 0.07542461 4.99606e-4 0.9245752 0.07542461 4.99725e-4 0.07542458 0.07542461 0.07542479 4.99576e-4 0.07542461 0.9245754 4.99755e-4 0.07542461 0.07542458 4.99755e-4 0.9245754 0.9245752 4.99576e-4 0.9245754 0.9995003 0.07542458 0.9245754 0.9995004 0.9245752 0.9245754 0.9245754 0.9995003 0.9245754 0.07542482 0.9995004 0.9245754 4.99755e-4 0.9245754 0.9245754 4.99576e-4 0.07542482 0.9245754 0.9995003 0.07542461 0.07542458 0.9995003 0.9245754 0.07542458 0.9995003 0.9245754 0.07542458 0.9995003 0.07542461 0.07542458 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.9245754 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.9245754 + + + + + + + + + + -0.8644259 0.01841655 0.3300502 -0.8715108 -0.05526615 0.3184382 -0.8644259 0.01841664 -0.3300501 -0.8715108 -0.05526611 -0.3184382 0.8738725 -0.06754867 0.3145678 0.8597026 -0.006149054 -0.3377912 0.8738725 -0.06754874 -0.3145678 0.8597026 -0.006148929 0.3377911 0.883319 -0.2990854 -0.116681 0.8478944 0.3571441 -0.06756432 0.8597026 0.3377913 0.00614921 0.883319 -0.2990854 0.116681 0.2990854 0.883319 -0.116681 -0.3571441 0.8478944 -0.06756432 -0.3377913 0.8597026 0.00614921 0.2990854 0.883319 0.116681 -0.883319 0.2990854 -0.116681 -0.8478944 -0.3571441 -0.06756432 -0.8597026 -0.3377913 0.00614921 -0.883319 0.2990854 0.116681 -0.2990854 -0.883319 -0.116681 0.3571441 -0.8478944 -0.06756432 0.3377913 -0.8597026 0.00614921 -0.2990854 -0.883319 0.116681 0.8360862 -0.3764972 0.1289794 0.7071068 -0.7071068 0 0.7071068 0.7071068 0 0.3764972 0.8360862 0.1289794 -0.3764972 -0.8360862 0.1289794 -0.7071068 -0.7071068 0 -0.7071068 0.7071068 0 -0.8360862 0.3764972 0.1289794 0.8360862 -0.3764971 -0.1289794 0.7071068 -0.7071068 0 0.3764971 0.8360862 -0.1289794 0.7071068 0.7071068 0 -0.3764971 -0.8360862 -0.1289794 -0.7071068 -0.7071068 0 -0.8360862 0.3764971 -0.1289794 -0.7071068 0.7071068 0 -0.376497 0.1289792 0.8360862 -0.3764973 -0.1289798 0.8360861 -0.8833191 -0.2990855 0.1166808 -0.883319 0.2990853 -0.1166812 -0.3764971 0.1289794 -0.8360862 -0.3764972 -0.1289795 -0.8360862 -0.8833191 -0.2990855 -0.1166807 -0.883319 0.2990853 0.1166812 0.883319 -0.2990853 0.1166812 0.8833191 0.2990855 -0.1166807 0.3764971 0.1289797 -0.8360862 0.3764971 -0.1289793 -0.8360862 0.883319 -0.2990853 -0.1166811 0.8833191 0.2990855 0.1166808 0.3764972 0.1289799 0.8360861 0.3764971 -0.128979 0.8360862 0.3764972 0.8360862 0.1289794 0.3764971 0.8360862 -0.1289794 0.8360862 -0.3764971 -0.1289794 0.8360862 -0.3764972 0.1289794 -0.8360862 0.3764972 0.1289794 -0.8360862 0.3764971 -0.1289794 -0.3764972 -0.8360862 0.1289794 -0.3764971 -0.8360862 -0.1289794 + + + + + + + + + + 0.1043954 -0.9396398 0.3258505 -0.06496345 -0.9379679 -0.3405817 0.1043953 -0.9396398 -0.3258505 -0.06496349 -0.937968 0.3405817 0.05187585 -0.9370471 -0.3453283 -0.1307439 -0.939827 -0.3156443 0.05187577 -0.9370471 0.3453283 -0.1307438 -0.939827 0.3156443 0 0.3634471 -0.9316148 -0.196368 0.2889368 -0.9369926 0.1307441 -0.3156442 -0.939827 0 -0.3634471 -0.9316148 -0.3634471 0 -0.9316148 -0.2889368 -0.196368 -0.9369926 0.3156442 0.1307441 -0.939827 0.3634471 0 -0.9316148 0 -0.3634471 -0.9316148 0.196368 -0.2889368 -0.9369926 -0.1307441 0.3156442 -0.939827 0 0.3634471 -0.9316148 0.3634471 0 -0.9316148 0.2889368 0.196368 -0.9369926 -0.3156442 -0.1307441 -0.939827 -0.3634471 0 -0.9316148 0.2608475 0.2608475 -0.9294714 0.6191276 0.6191276 -0.4830755 -0.6191276 0.6191276 -0.4830755 -0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 0.6191276 -0.6191276 -0.4830755 -0.6191276 -0.6191276 -0.4830755 -0.2608475 -0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 -0.6191276 -0.6191276 -0.4830755 0.2608475 -0.2608475 -0.9294714 0.6191276 -0.6191276 -0.4830755 -0.2608475 0.2608475 -0.9294714 -0.6191276 0.6191276 -0.4830755 0.2608475 0.2608475 -0.9294714 0.6191276 0.6191276 -0.4830755 0.2608476 -0.9294715 0.2608473 -0.2608474 -0.9294714 -0.2608479 1.81809e-7 -0.363447 -0.9316149 2.27262e-7 -0.3634472 -0.9316148 0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608477 2.72714e-7 -0.363447 0.9316149 2.72714e-7 -0.3634472 0.9316148 2.72714e-7 -0.3634472 -0.9316148 2.72714e-7 -0.363447 -0.9316149 -0.2608474 -0.9294714 -0.2608478 0.2608476 -0.9294714 0.2608474 1.81809e-7 -0.3634472 0.9316148 2.27262e-7 -0.3634471 0.9316149 -0.2608473 -0.9294714 0.260848 0.2608477 -0.9294715 -0.2608472 -0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608475 0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 -0.2608475 0.2608475 -0.9294714 + + + + + + + + + + + + + + + + + +

9 0 21 0 13 1 25 1 3 2 15 2 3 2 15 2 1 3 13 3 9 0 21 0 16 4 28 4 18 5 30 5 22 6 34 6 22 6 34 6 20 7 32 7 16 4 28 4 0 8 12 8 11 9 23 9 19 10 31 10 19 10 31 10 4 11 16 11 0 8 12 8 10 12 22 12 15 13 27 13 23 14 35 14 23 14 35 14 5 15 17 15 10 12 22 12 14 16 26 16 12 17 24 17 21 18 33 18 21 18 33 18 7 19 19 19 14 16 26 16 2 20 14 20 8 21 20 21 17 22 29 22 17 22 29 22 6 23 18 23 2 20 14 20 0 8 36 24 8 21 20 21 9 0 37 25 1 3 38 26 10 12 39 27 11 9 23 9 2 20 40 28 12 17 24 17 13 1 41 29 3 2 42 30 14 16 43 31 15 13 27 13 4 11 44 32 16 4 45 33 17 22 29 22 5 15 46 34 18 5 47 35 19 10 31 10 6 23 48 36 20 7 49 37 21 18 33 18 7 19 50 38 22 6 51 39 23 14 35 14 9 0 21 0 8 21 52 40 2 20 53 41 2 20 53 41 13 1 25 1 9 0 21 0 13 1 25 1 12 17 54 42 14 16 55 43 14 16 55 43 3 2 15 2 13 1 25 1 3 2 15 2 15 13 56 44 10 12 57 45 10 12 57 45 1 3 13 3 3 2 15 2 1 3 13 3 11 9 58 46 0 8 59 47 0 8 59 47 9 0 21 0 1 3 13 3 16 4 28 4 4 11 60 48 19 10 61 49 19 10 61 49 18 5 30 5 16 4 28 4 18 5 30 5 5 15 62 50 23 14 63 51 23 14 63 51 22 6 34 6 18 5 30 5 22 6 34 6 7 19 64 52 21 18 65 53 21 18 65 53 20 7 32 7 22 6 34 6 20 7 32 7 6 23 66 54 17 22 67 55 17 22 67 55 16 4 28 4 20 7 32 7 11 9 23 9 10 12 68 56 5 15 69 57 5 15 69 57 19 10 31 10 11 9 23 9 4 11 70 58 17 22 29 22 8 21 20 21 8 21 20 21 0 8 71 59 4 11 70 58 15 13 27 13 14 16 72 60 7 19 73 61 7 19 73 61 23 14 35 14 15 13 27 13 12 17 24 17 2 20 74 62 6 23 75 63 6 23 75 63 21 18 33 18 12 17 24 17

+
+
+
+
+ + + + + 0 0 0 + + + + + + + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + +
\ No newline at end of file diff --git a/Templates/Full/game/art/environment/Fog_Cube.cs b/Templates/Full/game/art/environment/Fog_Cube.cs new file mode 100644 index 000000000..3c686032c --- /dev/null +++ b/Templates/Full/game/art/environment/Fog_Cube.cs @@ -0,0 +1,8 @@ + +singleton TSShapeConstructor(Fog_CubeDAE) +{ + baseShape = "./Fog_Cube.DAE"; + lodType = "TrailingNumber"; + neverImport = "env*"; + loadLights = "0"; +}; diff --git a/Templates/Full/game/art/environment/LightVolume_Sphere.DAE b/Templates/Full/game/art/environment/LightVolume_Sphere.DAE new file mode 100644 index 000000000..81c93d8e0 --- /dev/null +++ b/Templates/Full/game/art/environment/LightVolume_Sphere.DAE @@ -0,0 +1,423 @@ + + + + + Richard + OpenCOLLADA for 3ds Max; Version: 1.4.1; Revision: exported; Platform: x64; Configuration: Release_Max2011_static + file:///G:/Documents%20and%20Settings/Richard/Mijn%20documenten/3dsmax/scenes/lightfog.max + + 2014-08-22T22:51:35 + 2014-08-22T22:51:35 + + Z_UP + + + + + + + + 0 0 0 1 + + + 0.588 0.588 0.588 1 + + + 0.588 0.588 0.588 1 + + + 0.9 0.9 0.9 1 + + + 0 + + + 0 0 0 1 + + + 1 1 1 1 + + + 1 + + + + + + + + 0 + 0 + 0 + 1.5 + 0 + 3 + 1 + 0 + + + 1 + 1 + 0 + 0.1 + 0 + + + + + + + + + + + + + + + 0 0 5 -9.48283e-8 2.169419 4.504844 -0.9412758 1.954579 4.504844 -1.69612 1.35261 4.504844 -2.115027 0.4827411 4.504844 -2.115027 -0.482741 4.504844 -1.69612 -1.35261 4.504844 -0.9412759 -1.954579 4.504844 2.58701e-8 -2.169419 4.504844 0.9412759 -1.954579 4.504844 1.696121 -1.35261 4.504844 2.115027 -0.4827399 4.504844 2.115026 0.4827427 4.504844 1.696119 1.352612 4.504844 0.9412734 1.95458 4.504844 -1.70875e-7 3.909158 3.117449 -1.69612 3.522029 3.117449 -3.056303 2.43732 3.117449 -3.811147 0.8698694 3.117449 -3.811147 -0.8698691 3.117449 -3.056303 -2.43732 3.117449 -1.696121 -3.522029 3.117449 4.66162e-8 -3.909158 3.117449 1.696121 -3.522029 3.117449 3.056304 -2.437319 3.117449 3.811147 -0.8698672 3.117449 3.811146 0.8698722 3.117449 3.0563 2.437323 3.117449 1.696116 3.522031 3.117449 -2.13077e-7 4.87464 1.112604 -2.115027 4.391898 1.112604 -3.811147 3.039288 1.112604 -4.752422 1.084709 1.112604 -4.752422 -1.084709 1.112604 -3.811147 -3.039288 1.112604 -2.115028 -4.391898 1.112604 5.81295e-8 -4.87464 1.112604 2.115028 -4.391898 1.112604 3.811148 -3.039287 1.112604 4.752423 -1.084707 1.112604 4.752421 1.084713 1.112604 3.811144 3.039291 1.112604 2.115022 4.391901 1.112604 -2.13077e-7 4.87464 -1.112605 -2.115027 4.391898 -1.112605 -3.811147 3.039288 -1.112605 -4.752422 1.084709 -1.112605 -4.752422 -1.084709 -1.112605 -3.811147 -3.039288 -1.112605 -2.115028 -4.391898 -1.112605 5.81295e-8 -4.87464 -1.112605 2.115028 -4.391898 -1.112605 3.811148 -3.039287 -1.112605 4.752423 -1.084707 -1.112605 4.752421 1.084713 -1.112605 3.811144 3.039291 -1.112605 2.115022 4.391901 -1.112605 -1.70875e-7 3.909157 -3.11745 -1.69612 3.522028 -3.11745 -3.056302 2.437319 -3.11745 -3.811146 0.8698692 -3.11745 -3.811146 -0.869869 -3.11745 -3.056302 -2.437319 -3.11745 -1.69612 -3.522028 -3.11745 4.66162e-8 -3.909157 -3.11745 1.69612 -3.522028 -3.11745 3.056303 -2.437318 -3.11745 3.811146 -0.8698671 -3.11745 3.811145 0.8698721 -3.11745 3.0563 2.437322 -3.11745 1.696116 3.52203 -3.11745 -9.48283e-8 2.169418 -4.504845 -0.9412755 1.954578 -4.504845 -1.696119 1.35261 -4.504845 -2.115026 0.4827409 -4.504845 -2.115026 -0.4827408 -4.504845 -1.69612 -1.35261 -4.504845 -0.9412756 -1.954578 -4.504845 2.58701e-8 -2.169418 -4.504845 0.9412756 -1.954578 -4.504845 1.69612 -1.352609 -4.504845 2.115026 -0.4827397 -4.504845 2.115026 0.4827425 -4.504845 1.696118 1.352612 -4.504845 0.9412731 1.954579 -4.504845 0 0 -5 + + + + + + + + + + 3.34297e-8 3.12427e-8 1 -1.46401e-7 0.4589442 0.8884651 -0.1991285 0.4134944 0.888465 -0.358817 0.286147 0.8884651 -0.4474375 0.1021247 0.888465 -0.4474375 -0.1021246 0.8884651 -0.358817 -0.286147 0.888465 -0.1991284 -0.4134944 0.8884651 -4.96273e-9 -0.4589442 0.888465 0.1991285 -0.4134944 0.888465 0.3588171 -0.2861469 0.888465 0.4474375 -0.1021244 0.8884651 0.4474374 0.102125 0.888465 0.3588168 0.2861473 0.8884651 0.1991281 0.4134945 0.8884651 -2.38195e-7 0.7935484 0.6085071 -0.3443078 0.7149624 0.6085071 -0.6204212 0.4947692 0.6085072 -0.7736526 0.1765811 0.6085071 -0.7736526 -0.176581 0.608507 -0.6204212 -0.4947692 0.6085072 -0.3443078 -0.7149624 0.6085071 -1.26699e-8 -0.7935485 0.6085071 0.3443078 -0.7149624 0.6085072 0.6204213 -0.4947691 0.6085071 0.7736526 -0.1765807 0.6085072 0.7736524 0.1765818 0.6085072 0.6204207 0.4947699 0.608507 0.3443072 0.7149627 0.6085071 -2.56849e-7 0.9764001 0.2159697 -0.4236442 0.879706 0.2159697 -0.7633804 0.6087754 0.2159697 -0.9519197 0.2172694 0.2159697 -0.9519197 -0.2172693 0.2159698 -0.7633804 -0.6087753 0.2159698 -0.4236441 -0.8797061 0.2159698 2.56849e-9 -0.9764001 0.2159697 0.4236443 -0.879706 0.2159698 0.7633805 -0.6087751 0.2159698 0.9519198 -0.2172689 0.2159698 0.9519196 0.2172702 0.2159698 0.7633796 0.6087762 0.2159697 0.4236434 0.8797064 0.2159697 -2.56849e-7 0.9764 -0.2159699 -0.4236442 0.8797059 -0.2159699 -0.7633803 0.6087754 -0.2159699 -0.9519196 0.2172694 -0.2159698 -0.9519197 -0.2172693 -0.2159699 -0.7633804 -0.6087753 -0.2159699 -0.4236442 -0.879706 -0.2159699 2.31164e-8 -0.9764 -0.2159699 0.4236442 -0.8797059 -0.2159699 0.7633805 -0.6087751 -0.2159699 0.9519197 -0.2172689 -0.2159699 0.9519195 0.2172701 -0.2159699 0.7633796 0.6087762 -0.2159699 0.4236434 0.8797063 -0.2159699 -1.95117e-7 0.7935483 -0.6085073 -0.3443078 0.7149623 -0.6085073 -0.6204211 0.4947692 -0.6085073 -0.7736524 0.1765811 -0.6085073 -0.7736524 -0.1765811 -0.6085073 -0.6204211 -0.4947692 -0.6085073 -0.3443078 -0.7149622 -0.6085073 1.77379e-8 -0.7935483 -0.6085073 0.3443078 -0.7149622 -0.6085073 0.6204212 -0.494769 -0.6085073 0.7736525 -0.1765806 -0.6085073 0.7736523 0.1765817 -0.6085073 0.6204206 0.4947698 -0.6085073 0.3443071 0.7149625 -0.6085073 -1.16624e-7 0.4589441 -0.8884652 -0.1991284 0.4134943 -0.8884652 -0.358817 0.2861468 -0.8884652 -0.4474374 0.1021247 -0.8884652 -0.4474373 -0.1021246 -0.8884652 -0.3588169 -0.2861468 -0.8884652 -0.1991284 -0.4134943 -0.8884652 -9.92546e-9 -0.4589441 -0.8884651 0.1991285 -0.4134943 -0.8884651 0.358817 -0.2861468 -0.8884652 0.4474374 -0.1021244 -0.8884651 0.4474373 0.102125 -0.8884652 0.3588167 0.2861473 -0.8884651 0.1991281 0.4134944 -0.8884652 2.59315e-8 -2.62439e-8 -1 + + + + + + + + + + -0.03571416 1 0.999001 3.79455e-8 0.8571429 0.999001 0.0714286 0.8571428 0.9990011 0.1428572 0.8571428 0.9990011 0.2142857 0.8571428 0.9990011 0.2857142 0.8571428 0.9990011 0.3571428 0.8571428 0.9990011 0.4285714 0.8571428 0.9990011 0.4999999 0.8571429 0.999001 0.5714285 0.8571429 0.999001 0.6428571 0.8571429 0.999001 0.7142857 0.8571429 0.999001 0.7857143 0.8571429 0.999001 0.857143 0.8571429 0.999001 0.9285716 0.8571429 0.999001 1 0.7142857 0.9990011 0.0714286 0.7142857 0.9990011 0.1428572 0.7142857 0.9990011 0.2142857 0.7142857 0.9990011 0.2857142 0.7142857 0.9990011 0.3571428 0.7142857 0.9990011 0.4285714 0.7142857 0.9990011 0.5 0.7142857 0.9990011 0.5714285 0.7142857 0.999001 0.6428571 0.7142857 0.999001 0.7142857 0.7142857 0.9990009 0.7857143 0.7142857 0.999001 0.857143 0.7142857 0.999001 0.9285716 0.7142857 0.999001 0.9999999 0.5714285 0.999001 0.0714286 0.5714285 0.999001 0.1428572 0.5714285 0.9990011 0.2142857 0.5714285 0.9990011 0.2857142 0.5714285 0.9990011 0.3571428 0.5714285 0.9990011 0.4285714 0.5714285 0.9990011 0.5 0.5714285 0.999001 0.5714285 0.5714285 0.999001 0.6428571 0.5714285 0.999001 0.7142857 0.5714285 0.9990009 0.7857143 0.5714285 0.9990009 0.8571429 0.5714285 0.999001 0.9285716 0.5714285 0.999001 0.9999999 0.4285714 0.999001 0.0714286 0.4285714 0.999001 0.1428572 0.4285714 0.9990011 0.2142857 0.4285714 0.9990011 0.2857142 0.4285714 0.9990011 0.3571428 0.4285714 0.9990011 0.4285714 0.4285714 0.9990011 0.5 0.4285714 0.999001 0.5714285 0.4285714 0.999001 0.6428571 0.4285714 0.999001 0.7142857 0.4285714 0.999001 0.7857143 0.4285714 0.999001 0.8571429 0.4285714 0.999001 0.9285716 0.4285714 0.999001 1 0.2857142 0.999001 0.0714286 0.2857142 0.9990011 0.1428572 0.2857142 0.9990011 0.2142857 0.2857142 0.9990011 0.2857142 0.2857143 0.9990011 0.3571428 0.2857143 0.9990011 0.4285714 0.2857142 0.9990011 0.5 0.2857142 0.999001 0.5714285 0.2857142 0.999001 0.6428571 0.2857142 0.999001 0.7142857 0.2857142 0.999001 0.7857143 0.2857142 0.999001 0.857143 0.2857142 0.999001 0.9285716 0.2857142 0.999001 3.79455e-8 0.1428571 0.999001 0.0714286 0.1428572 0.9990011 0.1428572 0.1428571 0.999001 0.2142857 0.1428572 0.9990011 0.2857142 0.1428572 0.9990011 0.3571428 0.1428572 0.9990011 0.4285714 0.1428572 0.9990011 0.4999999 0.1428571 0.999001 0.5714285 0.1428571 0.999001 0.6428571 0.1428571 0.999001 0.7142857 0.1428571 0.999001 0.7857143 0.1428571 0.999001 0.857143 0.1428571 0.999001 0.9285716 0.1428571 0.999001 -0.03571416 0 0.999001 0.03571432 1 0.999001 0.1071429 1 0.999001 0.1785714 1 0.999001 0.25 1 0.999001 0.3214285 1 0.999001 0.3928571 1 0.999001 0.4642856 1 0.999001 0.5357142 1 0.999001 0.6071428 1 0.999001 0.6785715 1 0.999001 0.75 1 0.999001 0.8214287 1 0.999001 0.8928573 1 0.999001 -0.07142836 0.8571429 0.999001 0 0.7142857 0.9990011 -0.07142836 0.8571429 0.999001 0 0.7142857 0.9990011 0 0.7142857 0.9990011 -5.96046e-8 0.5714285 0.999001 0 0.7142857 0.9990011 -5.96046e-8 0.5714285 0.999001 -5.96046e-8 0.4285714 0.999001 -5.96046e-8 0.5714285 0.999001 -5.96046e-8 0.4285714 0.999001 0 0.2857142 0.999001 -5.96046e-8 0.4285714 0.999001 0 0.2857142 0.999001 0 0.2857142 0.999001 -0.07142836 0.2857142 0.999001 -0.07142836 0.1428571 0.999001 -0.07142836 0.2857142 0.999001 0 0.2857142 0.999001 0.03571432 0 0.999001 0.1071429 0 0.999001 0.1785714 0 0.999001 0.25 0 0.999001 0.3214285 0 0.999001 0.3928571 0 0.999001 0.4642856 0 0.999001 0.5357142 0 0.999001 0.6071428 0 0.999001 0.6785715 0 0.999001 0.75 0 0.999001 0.8214287 0 0.999001 0.8928573 0 0.999001 -0.07142836 0.1428571 0.999001 + + + + + + + + + + -0.9749277 -0.2225218 3.95437e-8 -0.9749279 -0.03513084 0.01814697 -0.8631371 -0.4546571 0.01814702 -0.7818314 -0.6234899 4.56159e-8 -0.5803916 -0.7841328 0.01814686 -0.4338837 -0.9009689 4.26533e-8 -0.1826924 -0.9583017 0.01814685 1.04443e-15 -1 3.12427e-8 0.2511913 -0.9426673 0.01814685 0.4338836 -0.900969 1.36441e-8 0.6353235 -0.740326 0.01814683 0.7818314 -0.6234899 -6.65688e-9 0.8936221 -0.3913545 0.01814665 0.9749277 -0.2225219 -2.56394e-8 0.9749278 0.03512998 0.01814669 0.9749279 0.222521 -3.95437e-8 0.8631371 0.4546568 0.01814684 0.7818313 0.62349 -4.56159e-8 0.5803913 0.7841329 0.01814687 0.4338832 0.9009691 -4.26533e-8 0.1826917 0.9583018 0.01814686 -7.40827e-7 1 -3.12427e-8 -0.2511921 0.942667 0.01814683 -0.4338844 0.9009686 -1.36441e-8 -0.6353242 0.7403254 0.01814688 -0.7818321 0.623489 6.65693e-9 -0.852976 0.4757568 -0.03024468 -0.974928 0.2225204 2.56394e-8 -0.9545922 0.2647484 0.09073415 -0.974928 -0.08239544 0.1074507 -0.8783796 -0.4230055 1.2098e-7 -0.6078575 -0.7622294 -2.40103e-8 -0.2169419 -0.9504844 3.08126e-9 0.2169418 -0.9504845 1.00124e-8 0.6078575 -0.7622294 -1.22219e-8 0.8783796 -0.4230055 2.27489e-8 0.9749279 -1.0315e-7 -1.14217e-7 0.8783796 0.4230055 2.7348e-8 0.6078573 0.7622295 2.9091e-8 0.2169413 0.9504846 1.53869e-8 -0.2169426 0.9504843 -1.74207e-8 -0.6078583 0.7622288 -1.32728e-8 -0.8783801 0.4230047 1.08194e-8 -0.974928 0.08239487 -0.1074508 -0.9545922 0.2647484 0.09073415 -0.974928 0.08239487 -0.1074508 -0.9749279 -0.08239547 0.1074508 -0.9749279 -0.01037927 0.04692359 -0.8783797 -0.4230054 1.38382e-9 -0.974928 -0.08239544 0.1074507 -0.6078575 -0.7622294 -2.5756e-9 -0.2169418 -0.9504845 -4.34778e-9 0.2169417 -0.9504845 7.21083e-10 0.6078575 -0.7622294 2.68537e-9 0.8783797 -0.4230054 -1.49521e-8 0.9749279 9.89275e-9 3.31305e-8 0.8783796 0.4230055 6.33846e-10 0.6078573 0.7622295 2.8277e-9 0.2169413 0.9504845 1.9462e-9 -0.2169426 0.9504842 3.51617e-9 -0.6078584 0.7622287 -1.28249e-8 -0.8783801 0.4230047 -3.55722e-8 -0.974928 0.01037875 -0.04692358 -0.9749279 -0.01037927 0.04692359 -0.9749279 -0.01037929 -0.04692363 -0.8783796 -0.4230055 7.11577e-9 -0.9749279 -0.01037927 0.04692359 -0.6078576 -0.7622294 -5.38627e-9 -0.2169418 -0.9504845 -4.0761e-8 0.2169417 -0.9504845 -6.37691e-9 0.6078574 -0.7622295 4.32713e-8 0.8783797 -0.4230054 4.91462e-8 0.9749279 7.86884e-9 6.87766e-8 0.8783796 0.4230055 7.54338e-8 0.6078573 0.7622295 -3.74104e-9 0.2169413 0.9504845 -6.87179e-10 -0.2169426 0.9504843 -5.06594e-9 -0.6078584 0.7622287 1.11192e-8 -0.8783801 0.4230047 -7.55682e-8 -0.974928 0.01037875 0.04692348 -0.9749279 -0.01037935 -0.04692387 -0.9749279 -0.08239562 -0.107451 -0.8783797 -0.4230055 5.99473e-9 -0.9749279 -0.01037929 -0.04692363 -0.6078575 -0.7622295 -5.14789e-8 -0.2169418 -0.9504844 -6.99784e-8 0.2169419 -0.9504845 -6.77193e-8 0.6078575 -0.7622295 8.75301e-8 0.8783796 -0.4230056 2.38485e-7 0.9749279 -3.58523e-8 7.51737e-8 0.8783796 0.4230055 1.39721e-9 0.6078573 0.7622295 6.92574e-8 0.2169412 0.9504845 -5.31509e-8 -0.2169425 0.9504843 -5.50918e-9 -0.6078583 0.7622288 -2.65355e-8 -0.8605051 0.4601225 0.05372539 -0.974928 0.08239491 0.1074507 -0.9749278 -0.08239586 -0.1074513 -0.9749279 0.03512977 0.0181467 -0.8936222 -0.3913543 0.01814683 -0.9749279 -0.08239562 -0.107451 -0.6353234 -0.740326 0.01814686 -0.2511912 -0.9426673 0.01814672 0.1826924 -0.9583017 0.01814681 0.5803915 -0.7841328 0.01814685 0.8631371 -0.454657 0.01814701 0.9749278 -0.03513059 0.01814698 0.8936221 0.3913542 0.01814686 0.6353234 0.7403261 0.01814691 0.2511908 0.9426673 0.01814683 -0.1826932 0.9583015 0.01814677 -0.5803923 0.7841322 0.01814686 -0.802168 0.5812611 0.09073409 -0.91413 0.3487692 -0.1074508 -0.9545922 0.2647484 -0.09073412 -0.91413 0.3487692 -0.1074508 -0.974928 0.08239496 0.1074508 -0.9749278 -0.2225216 -1.94415e-8 -0.7818317 -0.6234895 -3.91125e-9 -0.4338831 -0.9009692 1.23937e-8 -6.80542e-16 -1 2.62439e-8 0.4338836 -0.9009689 3.48962e-8 0.7818314 -0.6234899 3.66368e-8 0.9749278 -0.2225216 3.11211e-8 0.9749279 0.222521 1.94415e-8 0.7818313 0.6234901 3.91122e-9 0.4338837 0.9009689 -1.23937e-8 -1.19783e-6 1 -2.62439e-8 -0.4338844 0.9009685 -3.48962e-8 -0.7818321 0.623489 -3.66368e-8 -0.974928 0.2225205 -3.11211e-8 -0.9545922 0.2647484 -0.09073412 + + + + + + + + + + -0.2225218 0.9749277 -2.30205e-8 -0.04052453 0.8877353 -0.4585672 -0.4216851 0.7822389 -0.4585672 -0.6234899 0.7818314 -3.58345e-9 -0.7193257 0.5218109 -0.4585672 -0.9009689 0.4338837 1.65634e-8 -0.8744953 0.1580317 -0.4585672 -1 0 3.34297e-8 -0.8564605 -0.2370475 -0.4585672 -0.900969 -0.4338836 4.36748e-8 -0.6687932 -0.5851767 -0.4585672 -0.6234899 -0.7818314 4.52696e-8 -0.3486635 -0.8174044 -0.4585672 -0.2225219 -0.9749277 3.78982e-8 0.04052361 -0.8877353 -0.4585672 0.222521 -0.9749279 2.30206e-8 0.4216849 -0.7822391 -0.4585672 0.62349 -0.7818313 3.58345e-9 0.7193259 -0.5218107 -0.4585672 0.9009691 -0.4338832 -1.65634e-8 0.8744955 -0.1580312 -0.4585672 1 7.40827e-7 -3.34297e-8 0.8564603 0.2370483 -0.4585672 0.9009686 0.4338844 -4.36748e-8 0.6687926 0.5851774 -0.4585672 0.623489 0.7818321 -4.52696e-8 0.445375 0.7693955 -0.4578992 0.2225204 0.974928 -3.78982e-8 0.1987407 0.8707421 -0.4497891 -0.1375673 0.6027217 -0.7860037 -0.2640215 0.5482458 -0.7935484 -0.4757501 0.3793979 -0.7935484 -0.5932505 0.1354056 -0.7935484 -0.5932505 -0.1354055 -0.7935485 -0.4757501 -0.3793979 -0.7935484 -0.2640214 -0.5482459 -0.7935484 -1.5735e-7 -0.6085071 -0.7935484 0.2640215 -0.5482459 -0.7935484 0.4757502 -0.3793978 -0.7935484 0.5932507 -0.1354052 -0.7935484 0.5932505 0.135406 -0.7935484 0.4757496 0.3793984 -0.7935485 0.2640209 0.5482461 -0.7935484 0.1375669 0.6027217 -0.7860037 0.1987407 0.8707421 -0.4497891 0.137567 0.6027217 -0.7860037 -0.1375673 0.6027217 -0.7860037 -0.04923392 0.2157078 -0.975216 -0.09370578 0.194582 -0.9764001 -0.1375673 0.6027217 -0.7860037 -0.168852 0.1346549 -0.9764001 -0.2105549 0.04805777 -0.9764001 -0.2105549 -0.04805776 -0.9764001 -0.168852 -0.1346549 -0.9764001 -0.09370578 -0.194582 -0.9764001 3.5372e-8 -0.2159697 -0.9764001 0.09370579 -0.194582 -0.9764001 0.168852 -0.1346549 -0.9764 0.210555 -0.04805767 -0.9764 0.2105549 0.04805796 -0.9764 0.1688518 0.1346551 -0.9764001 0.09370564 0.1945821 -0.9764001 0.04923379 0.2157078 -0.975216 -0.04923392 0.2157078 -0.975216 0.04923396 -0.215708 -0.9752159 0.09370587 -0.1945822 -0.9764 -0.04923392 0.2157078 -0.975216 0.1688521 -0.134655 -0.9764 0.2105551 -0.04805776 -0.9764 0.210555 0.04805779 -0.9764 0.1688521 0.134655 -0.9764 0.0937059 0.1945822 -0.9764 6.71373e-8 0.2159699 -0.9764 -0.09370582 0.1945822 -0.9764 -0.1688522 0.134655 -0.9764 -0.2105552 0.04805771 -0.9764 -0.210555 -0.04805798 -0.9764 -0.1688519 -0.1346552 -0.9764 -0.09370562 -0.1945823 -0.9764 -0.0492337 -0.215708 -0.9752159 0.04923421 -0.215708 -0.9752159 0.1375676 -0.6027218 -0.7860035 0.2640215 -0.5482461 -0.7935483 0.04923396 -0.215708 -0.9752159 0.4757503 -0.379398 -0.7935483 0.5932507 -0.1354055 -0.7935483 0.5932507 0.1354057 -0.7935483 0.4757503 0.379398 -0.7935482 0.2640218 0.548246 -0.7935483 8.35655e-8 0.6085073 -0.7935483 -0.2640215 0.5482461 -0.7935483 -0.4757503 0.379398 -0.7935483 -0.5932509 0.1354052 -0.7935483 -0.5932507 -0.135406 -0.7935483 -0.4757498 -0.3793985 -0.7935483 -0.3258031 -0.5168711 -0.7916417 -0.1375669 -0.6027219 -0.7860036 0.137568 -0.6027218 -0.7860035 -0.04052343 -0.8877354 -0.458567 0.3486632 -0.8174045 -0.4585671 0.1375676 -0.6027218 -0.7860035 0.6687933 -0.5851768 -0.458567 0.8564606 -0.2370474 -0.4585671 0.8744955 0.1580318 -0.458567 0.7193258 0.5218109 -0.458567 0.4216851 0.782239 -0.458567 0.04052431 0.8877353 -0.4585671 -0.3486632 0.8174045 -0.4585671 -0.6687933 0.5851767 -0.458567 -0.8564607 0.2370471 -0.4585671 -0.8744953 -0.1580326 -0.458567 -0.7193253 -0.5218116 -0.4585671 -0.5568597 -0.6982815 -0.449789 -0.137567 -0.6027219 -0.7860035 -0.1987408 -0.8707422 -0.449789 -0.137567 -0.6027219 -0.7860035 -0.137567 -0.6027219 -0.7860036 0.2225216 -0.9749278 3.13562e-8 0.6234895 -0.7818317 3.66863e-8 0.9009692 -0.4338831 3.47502e-8 1 0 2.59315e-8 0.9009689 0.4338836 1.19766e-8 0.6234899 0.7818314 -4.35029e-9 0.2225216 0.9749278 -1.98156e-8 -0.222521 0.9749279 -3.13562e-8 -0.6234901 0.7818313 -3.66863e-8 -0.9009689 0.4338837 -3.47502e-8 -1 -1.19783e-6 -2.59314e-8 -0.9009685 -0.4338844 -1.19766e-8 -0.623489 -0.7818321 4.35033e-9 -0.2225205 -0.974928 1.98156e-8 -0.1987408 -0.8707422 -0.449789 + + + + + + + + + + + + + + + + + +

0 0 86 0 1 1 1 1 2 2 2 2 0 0 87 3 2 2 2 2 3 3 3 4 0 0 88 5 3 3 3 4 4 4 4 6 0 0 89 7 4 4 4 6 5 5 5 8 0 0 90 9 5 5 5 8 6 6 6 10 0 0 91 11 6 6 6 10 7 7 7 12 0 0 92 13 7 7 7 12 8 8 8 14 0 0 93 15 8 8 8 14 9 9 9 16 0 0 94 17 9 9 9 16 10 10 10 18 0 0 95 19 10 10 10 18 11 11 11 20 0 0 96 21 11 11 11 20 12 12 12 22 0 0 97 23 12 12 12 22 13 13 13 24 0 0 98 25 13 13 13 24 14 14 14 26 0 0 0 27 14 14 99 28 1 1 1 1 1 1 1 1 15 15 100 29 16 16 16 30 1 1 1 1 16 16 16 30 2 2 2 2 2 2 2 2 16 16 16 30 17 17 17 31 2 2 2 2 17 17 17 31 3 3 3 4 3 3 3 4 17 17 17 31 18 18 18 32 3 3 3 4 18 18 18 32 4 4 4 6 4 4 4 6 18 18 18 32 19 19 19 33 4 4 4 6 19 19 19 33 5 5 5 8 5 5 5 8 19 19 19 33 20 20 20 34 5 5 5 8 20 20 20 34 6 6 6 10 6 6 6 10 20 20 20 34 21 21 21 35 6 6 6 10 21 21 21 35 7 7 7 12 7 7 7 12 21 21 21 35 22 22 22 36 7 7 7 12 22 22 22 36 8 8 8 14 8 8 8 14 22 22 22 36 23 23 23 37 8 8 8 14 23 23 23 37 9 9 9 16 9 9 9 16 23 23 23 37 24 24 24 38 9 9 9 16 24 24 24 38 10 10 10 18 10 10 10 18 24 24 24 38 25 25 25 39 10 10 10 18 25 25 25 39 11 11 11 20 11 11 11 20 25 25 25 39 26 26 26 40 11 11 11 20 26 26 26 40 12 12 12 22 12 12 12 22 26 26 26 40 27 27 27 41 12 12 12 22 27 27 27 41 13 13 13 24 13 13 13 24 27 27 27 41 28 28 28 42 13 13 13 24 28 28 28 42 14 14 14 26 14 14 14 26 28 28 28 42 15 15 15 43 14 14 101 44 15 15 102 45 1 1 1 1 15 15 103 46 29 29 104 47 30 30 30 48 15 15 105 49 30 30 30 48 16 16 16 30 16 16 16 30 30 30 30 48 31 31 31 50 16 16 16 30 31 31 31 50 17 17 17 31 17 17 17 31 31 31 31 50 32 32 32 51 17 17 17 31 32 32 32 51 18 18 18 32 18 18 18 32 32 32 32 51 33 33 33 52 18 18 18 32 33 33 33 52 19 19 19 33 19 19 19 33 33 33 33 52 34 34 34 53 19 19 19 33 34 34 34 53 20 20 20 34 20 20 20 34 34 34 34 53 35 35 35 54 20 20 20 34 35 35 35 54 21 21 21 35 21 21 21 35 35 35 35 54 36 36 36 55 21 21 21 35 36 36 36 55 22 22 22 36 22 22 22 36 36 36 36 55 37 37 37 56 22 22 22 36 37 37 37 56 23 23 23 37 23 23 23 37 37 37 37 56 38 38 38 57 23 23 23 37 38 38 38 57 24 24 24 38 24 24 24 38 38 38 38 57 39 39 39 58 24 24 24 38 39 39 39 58 25 25 25 39 25 25 25 39 39 39 39 58 40 40 40 59 25 25 25 39 40 40 40 59 26 26 26 40 26 26 26 40 40 40 40 59 41 41 41 60 26 26 26 40 41 41 41 60 27 27 27 41 27 27 27 41 41 41 41 60 42 42 42 61 27 27 27 41 42 42 42 61 28 28 28 42 28 28 28 42 42 42 42 61 29 29 29 62 28 28 28 42 29 29 29 62 15 15 15 43 29 29 106 63 43 43 107 64 44 44 44 65 29 29 108 66 44 44 44 65 30 30 30 48 30 30 30 48 44 44 44 65 45 45 45 67 30 30 30 48 45 45 45 67 31 31 31 50 31 31 31 50 45 45 45 67 46 46 46 68 31 31 31 50 46 46 46 68 32 32 32 51 32 32 32 51 46 46 46 68 47 47 47 69 32 32 32 51 47 47 47 69 33 33 33 52 33 33 33 52 47 47 47 69 48 48 48 70 33 33 33 52 48 48 48 70 34 34 34 53 34 34 34 53 48 48 48 70 49 49 49 71 34 34 34 53 49 49 49 71 35 35 35 54 35 35 35 54 49 49 49 71 50 50 50 72 35 35 35 54 50 50 50 72 36 36 36 55 36 36 36 55 50 50 50 72 51 51 51 73 36 36 36 55 51 51 51 73 37 37 37 56 37 37 37 56 51 51 51 73 52 52 52 74 37 37 37 56 52 52 52 74 38 38 38 57 38 38 38 57 52 52 52 74 53 53 53 75 38 38 38 57 53 53 53 75 39 39 39 58 39 39 39 58 53 53 53 75 54 54 54 76 39 39 39 58 54 54 54 76 40 40 40 59 40 40 40 59 54 54 54 76 55 55 55 77 40 40 40 59 55 55 55 77 41 41 41 60 41 41 41 60 55 55 55 77 56 56 56 78 41 41 41 60 56 56 56 78 42 42 42 61 42 42 42 61 56 56 56 78 43 43 43 79 42 42 42 61 43 43 43 79 29 29 29 62 43 43 109 80 57 57 110 81 58 58 58 82 43 43 111 83 58 58 58 82 44 44 44 65 44 44 44 65 58 58 58 82 59 59 59 84 44 44 44 65 59 59 59 84 45 45 45 67 45 45 45 67 59 59 59 84 60 60 60 85 45 45 45 67 60 60 60 85 46 46 46 68 46 46 46 68 60 60 60 85 61 61 61 86 46 46 46 68 61 61 61 86 47 47 47 69 47 47 47 69 61 61 61 86 62 62 62 87 47 47 47 69 62 62 62 87 48 48 48 70 48 48 48 70 62 62 62 87 63 63 63 88 48 48 48 70 63 63 63 88 49 49 49 71 49 49 49 71 63 63 63 88 64 64 64 89 49 49 49 71 64 64 64 89 50 50 50 72 50 50 50 72 64 64 64 89 65 65 65 90 50 50 50 72 65 65 65 90 51 51 51 73 51 51 51 73 65 65 65 90 66 66 66 91 51 51 51 73 66 66 66 91 52 52 52 74 52 52 52 74 66 66 66 91 67 67 67 92 52 52 52 74 67 67 67 92 53 53 53 75 53 53 53 75 67 67 67 92 68 68 68 93 53 53 53 75 68 68 68 93 54 54 54 76 54 54 54 76 68 68 68 93 69 69 69 94 54 54 54 76 69 69 69 94 55 55 55 77 55 55 55 77 69 69 69 94 70 70 70 95 55 55 55 77 70 70 70 95 56 56 56 78 56 56 56 78 70 70 70 95 57 57 57 96 56 56 56 78 57 57 57 96 43 43 43 79 57 57 112 97 71 71 71 98 72 72 72 99 57 57 113 100 72 72 72 99 58 58 58 82 58 58 58 82 72 72 72 99 73 73 73 101 58 58 58 82 73 73 73 101 59 59 59 84 59 59 59 84 73 73 73 101 74 74 74 102 59 59 59 84 74 74 74 102 60 60 60 85 60 60 60 85 74 74 74 102 75 75 75 103 60 60 60 85 75 75 75 103 61 61 61 86 61 61 61 86 75 75 75 103 76 76 76 104 61 61 61 86 76 76 76 104 62 62 62 87 62 62 62 87 76 76 76 104 77 77 77 105 62 62 62 87 77 77 77 105 63 63 63 88 63 63 63 88 77 77 77 105 78 78 78 106 63 63 63 88 78 78 78 106 64 64 64 89 64 64 64 89 78 78 78 106 79 79 79 107 64 64 64 89 79 79 79 107 65 65 65 90 65 65 65 90 79 79 79 107 80 80 80 108 65 65 65 90 80 80 80 108 66 66 66 91 66 66 66 91 80 80 80 108 81 81 81 109 66 66 66 91 81 81 81 109 67 67 67 92 67 67 67 92 81 81 81 109 82 82 82 110 67 67 67 92 82 82 82 110 68 68 68 93 68 68 68 93 82 82 82 110 83 83 83 111 68 68 68 93 83 83 83 111 69 69 69 94 69 69 69 94 83 83 83 111 84 84 84 112 69 69 69 94 84 84 84 112 70 70 70 95 70 70 114 113 84 84 115 114 71 71 71 98 70 70 116 115 71 71 71 98 57 57 117 116 85 85 118 117 72 72 72 99 71 71 71 98 85 85 119 118 73 73 73 101 72 72 72 99 85 85 120 119 74 74 74 102 73 73 73 101 85 85 121 120 75 75 75 103 74 74 74 102 85 85 122 121 76 76 76 104 75 75 75 103 85 85 123 122 77 77 77 105 76 76 76 104 85 85 124 123 78 78 78 106 77 77 77 105 85 85 125 124 79 79 79 107 78 78 78 106 85 85 126 125 80 80 80 108 79 79 79 107 85 85 127 126 81 81 81 109 80 80 80 108 85 85 128 127 82 82 82 110 81 81 81 109 85 85 129 128 83 83 83 111 82 82 82 110 85 85 130 129 84 84 84 112 83 83 83 111 85 85 85 130 71 71 71 98 84 84 131 131

+
+
+
+ + + + 0 0 5 -1.28465e-7 2.938926 4.045085 -1.727457 2.377641 4.045085 -2.795085 0.9081783 4.045085 -2.795085 -0.9081781 4.045085 -1.727458 -2.377641 4.045085 3.50463e-8 -2.938926 4.045085 1.727458 -2.377641 4.045085 2.795085 -0.9081767 4.045085 2.795084 0.9081804 4.045085 1.727455 2.377643 4.045085 -2.0786e-7 4.755283 1.545085 -2.795085 3.847105 1.545085 -4.522542 1.469463 1.545085 -4.522543 -1.469463 1.545085 -2.795086 -3.847104 1.545085 5.67062e-8 -4.755283 1.545085 2.795086 -3.847104 1.545085 4.522543 -1.469461 1.545085 4.522542 1.469467 1.545085 2.795081 3.847108 1.545085 -2.0786e-7 4.755282 -1.545085 -2.795084 3.847104 -1.545085 -4.522542 1.469463 -1.545085 -4.522542 -1.469463 -1.545085 -2.795086 -3.847103 -1.545085 5.67062e-8 -4.755282 -1.545085 2.795086 -3.847103 -1.545085 4.522543 -1.469461 -1.545085 4.522542 1.469467 -1.545085 2.795081 3.847107 -1.545085 -1.28465e-7 2.938926 -4.045085 -1.727457 2.377641 -4.045085 -2.795085 0.9081782 -4.045085 -2.795085 -0.908178 -4.045085 -1.727458 -2.37764 -4.045085 3.50463e-8 -2.938926 -4.045085 1.727458 -2.37764 -4.045085 2.795085 -0.9081766 -4.045085 2.795084 0.9081803 -4.045085 1.727455 2.377643 -4.045085 0 0 -5 + + + + + + + + + + 0 -2.11156e-8 1 -2.11354e-7 0.6252257 0.780444 -0.3674984 0.5058182 0.780444 -0.5946249 0.1932054 0.780444 -0.594625 -0.1932053 0.780444 -0.3674985 -0.5058182 0.780444 1.05677e-8 -0.6252257 0.780444 0.3674986 -0.5058181 0.780444 0.5946251 -0.1932051 0.780444 0.5946248 0.1932058 0.780444 0.3674981 0.5058185 0.780444 -2.70626e-7 0.9562714 0.2924812 -0.5620822 0.7736397 0.2924811 -0.909468 0.2955042 0.2924811 -0.9094681 -0.295504 0.2924812 -0.5620822 -0.7736397 0.2924811 5.52297e-9 -0.9562714 0.2924811 0.5620824 -0.7736396 0.2924811 0.9094682 -0.2955036 0.2924811 0.9094678 0.2955048 0.2924812 0.5620816 0.7736402 0.2924811 -2.70626e-7 0.9562712 -0.2924812 -0.5620822 0.7736397 -0.2924812 -0.909468 0.2955042 -0.2924812 -0.9094681 -0.295504 -0.2924812 -0.5620822 -0.7736396 -0.2924812 2.76149e-9 -0.9562712 -0.2924812 0.5620824 -0.7736395 -0.2924812 0.9094682 -0.2955037 -0.2924812 0.9094678 0.2955048 -0.2924812 0.5620815 0.7736402 -0.2924812 -1.638e-7 0.6252257 -0.780444 -0.3674985 0.5058182 -0.780444 -0.594625 0.1932054 -0.780444 -0.594625 -0.1932053 -0.780444 -0.3674985 -0.5058182 -0.780444 -3.17032e-8 -0.6252257 -0.780444 0.3674986 -0.5058181 -0.780444 0.5946251 -0.1932051 -0.780444 0.5946248 0.1932058 -0.780444 0.3674981 0.5058185 -0.780444 1.51768e-8 -4.22312e-8 -1 + + + + + + + + + + 0.95 1 0.999001 0.9999999 0.8 0.9990011 0.09999996 0.8 0.999001 0.2 0.8 0.999001 0.3 0.8 0.999001 0.3999999 0.8 0.999001 0.5 0.8 0.9990011 0.6 0.8 0.9990011 0.7 0.8 0.9990011 0.8000001 0.8 0.9990011 0.9000001 0.8 0.9990011 0.9999999 0.6 0.9990011 0.09999996 0.6 0.999001 0.2 0.6 0.999001 0.3 0.6 0.9990011 0.3999999 0.6 0.999001 0.5 0.6 0.9990011 0.6 0.6 0.9990011 0.7 0.6 0.9990011 0.8000001 0.6 0.9990011 0.9000001 0.6 0.9990011 0.9999999 0.4 0.9990011 0.09999996 0.4 0.999001 0.2 0.4 0.9990009 0.3 0.4 0.999001 0.3999999 0.4 0.999001 0.5 0.4 0.9990011 0.6 0.4 0.999001 0.7 0.4 0.9990011 0.8000001 0.4 0.9990011 0.9000001 0.4 0.999001 0.9999999 0.2 0.9990011 0.09999996 0.2 0.999001 0.2 0.2 0.999001 0.3 0.2 0.999001 0.3999999 0.2 0.999001 0.5 0.2 0.9990011 0.6 0.2 0.9990011 0.7 0.2 0.9990011 0.8000001 0.2 0.9990011 0.9000001 0.2 0.9990011 0.95 0 0.999001 0.04999995 1 0.999001 -5.96046e-8 0.8 0.9990011 0.15 1 0.999001 0.25 1 0.999001 0.35 1 0.999001 0.45 1 0.999001 0.55 1 0.999001 0.65 1 0.999001 0.7500001 1 0.999001 0.8500001 1 0.999001 -5.96046e-8 0.8 0.9990011 -5.96046e-8 0.6 0.9990011 -5.96046e-8 0.8 0.9990011 -5.96046e-8 0.6 0.9990011 -5.96046e-8 0.4 0.9990011 -5.96046e-8 0.6 0.9990011 -5.96046e-8 0.4 0.9990011 -5.96046e-8 0.2 0.9990011 -5.96046e-8 0.4 0.9990011 0.04999995 0 0.999001 -5.96046e-8 0.2 0.9990011 0.15 0 0.999001 0.25 0 0.999001 0.35 0 0.999001 0.45 0 0.999001 0.55 0 0.999001 0.65 0 0.999001 0.7500001 0 0.999001 0.8500001 0 0.999001 + + + + + + + + + + -0.9510565 -0.3090171 -6.52508e-9 -0.9510565 -0.1882202 0.1507859 -0.7472943 -0.5894716 0.03015721 -0.5877853 -0.809017 -1.70829e-8 -0.2580911 -0.9161411 0.03015718 -1.31262e-7 -1 -2.11156e-8 0.3296941 -0.8928759 0.0301572 0.5877852 -0.809017 -1.70829e-8 0.7915474 -0.5285625 0.03015717 0.9510565 -0.3090172 -6.52508e-9 0.9510565 0.03764403 0.0301572 0.9510565 0.3090172 6.52508e-9 0.7472941 0.5894718 0.03015722 0.587785 0.8090172 1.70829e-8 0.2580906 0.9161412 0.03015722 -6.5631e-7 1 2.11156e-8 -0.3296949 0.8928756 0.0301572 -0.587786 0.8090165 1.70829e-8 -0.7915479 0.5285618 0.03015718 -0.9510567 0.3090165 6.52507e-9 -0.9510567 0.1882196 -0.1507859 -0.9510565 -0.1882202 0.1507858 -0.9510566 -0.02643514 0.08642931 -0.7694209 -0.559017 7.9155e-10 -0.9510565 -0.1882202 0.1507859 -0.2938927 -0.9045085 -4.0073e-9 0.2938925 -0.9045085 -7.41231e-10 0.7694209 -0.5590171 -6.34775e-9 0.9510565 4.77085e-9 -2.3606e-9 0.7694207 0.5590172 -6.72929e-9 0.2938922 0.9045086 -2.86915e-9 -0.2938933 0.9045082 -2.409e-9 -0.7694214 0.5590164 -1.96186e-8 -0.9510566 0.0264346 -0.0864293 -0.9510566 -0.02643514 0.08642932 -0.9510566 -0.02643521 -0.08642933 -0.7694209 -0.559017 1.17386e-8 -0.9510566 -0.02643514 0.08642931 -0.2938927 -0.9045085 -3.27196e-9 0.2938926 -0.9045085 1.16709e-8 0.7694209 -0.5590171 -4.67655e-8 0.9510565 2.37408e-9 1.21738e-9 0.7694207 0.5590172 1.66922e-8 0.2938922 0.9045086 -7.07564e-9 -0.2938933 0.9045082 1.75192e-8 -0.7694214 0.5590164 1.41495e-8 -0.9510566 0.02643467 0.08642932 -0.9510567 -0.0264351 -0.08642897 -0.9510566 -0.1882199 -0.1507856 -0.7915475 -0.5285623 0.03015731 -0.9510566 -0.02643521 -0.08642933 -0.3296942 -0.8928758 0.03015721 0.258091 -0.9161412 0.03015719 0.7472943 -0.5894716 0.03015712 0.9510565 -0.03764394 0.03015711 0.7915473 0.5285625 0.03015719 0.3296938 0.892876 0.03015719 -0.2580917 0.9161409 0.03015721 -0.7472948 0.5894711 0.03015717 -0.9510567 0.1882196 0.1507858 -0.9510566 -0.3090166 -1.38389e-9 -0.9510567 -0.1882199 -0.1507856 -0.5877853 -0.8090169 2.5245e-8 -6.40936e-16 -1 4.22312e-8 0.5877852 -0.809017 4.30865e-8 0.9510566 -0.3090169 2.74842e-8 0.9510565 0.3090172 1.38386e-9 0.587785 0.8090172 -2.5245e-8 -6.5631e-7 1 -4.22312e-8 -0.587786 0.8090165 -4.30865e-8 -0.9510567 0.3090165 -2.74842e-8 + + + + + + + + + + -0.3090171 0.9510565 2.00821e-8 -0.2458018 0.7565 -0.6060439 -0.4991224 0.60081 -0.6244231 -0.809017 0.5877853 1.24114e-8 -0.7569457 0.1926888 -0.6244232 -1 1.31262e-7 2.77168e-15 -0.7256415 -0.289033 -0.6244231 -0.809017 -0.5877852 -1.24114e-8 -0.417167 -0.660354 -0.6244232 -0.3090172 -0.9510565 -2.00821e-8 0.05065125 -0.7794422 -0.6244232 0.3090172 -0.9510565 -2.00821e-8 0.4991225 -0.6008098 -0.6244231 0.8090172 -0.587785 -1.24114e-8 0.7569458 -0.1926883 -0.6244232 1 6.5631e-7 1.38584e-14 0.7256413 0.2890337 -0.6244231 0.8090165 0.587786 1.24115e-8 0.4171665 0.6603543 -0.6244232 0.3090165 0.9510567 2.00821e-8 0.2458013 0.7565002 -0.6060439 -0.2458018 0.7565 -0.6060439 -0.09460663 0.2911693 -0.9519822 -0.1719161 0.2366222 -0.9562713 -0.2458018 0.7565 -0.6060439 -0.2781661 0.09038166 -0.9562713 -0.2781661 -0.09038162 -0.9562713 -0.1719161 -0.2366222 -0.9562713 -9.06353e-10 -0.2924811 -0.9562713 0.1719161 -0.2366221 -0.9562713 0.2781661 -0.09038149 -0.9562713 0.2781661 0.09038187 -0.9562713 0.1719159 0.2366223 -0.9562713 0.09460646 0.2911693 -0.9519822 -0.09460664 0.2911693 -0.9519822 0.09460667 -0.2911693 -0.9519821 0.1719161 -0.2366223 -0.9562713 -0.09460663 0.2911693 -0.9519822 0.2781661 -0.09038168 -0.9562713 0.2781662 0.09038165 -0.9562713 0.1719161 0.2366223 -0.9562713 4.93948e-10 0.2924813 -0.9562713 -0.1719162 0.2366222 -0.9562713 -0.2781662 0.09038154 -0.9562713 -0.2781661 -0.09038187 -0.9562713 -0.171916 -0.2366224 -0.9562713 -0.09460649 -0.2911694 -0.9519821 0.09460628 -0.2911694 -0.9519822 0.2458014 -0.7565001 -0.6060439 0.4171668 -0.6603542 -0.6244231 0.09460667 -0.2911693 -0.9519821 0.7256415 -0.2890331 -0.6244232 0.7569457 0.1926887 -0.6244231 0.4991223 0.60081 -0.6244231 0.05065112 0.7794422 -0.6244232 -0.4171671 0.6603539 -0.6244232 -0.7256416 0.2890327 -0.6244232 -0.7569456 -0.1926893 -0.6244231 -0.4991219 -0.6008104 -0.6244231 -0.2458013 -0.7565002 -0.6060439 0.3090166 -0.9510566 4.48541e-8 0.2458014 -0.7565001 -0.6060439 0.8090169 -0.5877853 3.71012e-8 1 0 1.51768e-8 0.809017 0.5877852 -1.25446e-8 0.3090169 0.9510566 -3.54744e-8 -0.3090172 0.9510565 -4.48541e-8 -0.8090172 0.587785 -3.71012e-8 -1 -6.5631e-7 -1.51768e-8 -0.8090165 -0.587786 1.25446e-8 -0.3090165 -0.9510567 3.54744e-8 + + + + + + + + + + + + + + + + + +

0 0 42 0 1 1 43 1 2 2 2 2 0 0 44 3 2 2 2 2 3 3 3 4 0 0 45 5 3 3 3 4 4 4 4 6 0 0 46 7 4 4 4 6 5 5 5 8 0 0 47 9 5 5 5 8 6 6 6 10 0 0 48 11 6 6 6 10 7 7 7 12 0 0 49 13 7 7 7 12 8 8 8 14 0 0 50 15 8 8 8 14 9 9 9 16 0 0 51 17 9 9 9 16 10 10 10 18 0 0 0 19 10 10 10 18 1 1 1 20 1 1 52 21 11 11 53 22 12 12 12 23 1 1 54 24 12 12 12 23 2 2 2 2 2 2 2 2 12 12 12 23 13 13 13 25 2 2 2 2 13 13 13 25 3 3 3 4 3 3 3 4 13 13 13 25 14 14 14 26 3 3 3 4 14 14 14 26 4 4 4 6 4 4 4 6 14 14 14 26 15 15 15 27 4 4 4 6 15 15 15 27 5 5 5 8 5 5 5 8 15 15 15 27 16 16 16 28 5 5 5 8 16 16 16 28 6 6 6 10 6 6 6 10 16 16 16 28 17 17 17 29 6 6 6 10 17 17 17 29 7 7 7 12 7 7 7 12 17 17 17 29 18 18 18 30 7 7 7 12 18 18 18 30 8 8 8 14 8 8 8 14 18 18 18 30 19 19 19 31 8 8 8 14 19 19 19 31 9 9 9 16 9 9 9 16 19 19 19 31 20 20 20 32 9 9 9 16 20 20 20 32 10 10 10 18 10 10 10 18 20 20 20 32 11 11 11 33 10 10 10 18 11 11 11 33 1 1 1 20 11 11 55 34 21 21 56 35 22 22 22 36 11 11 57 37 22 22 22 36 12 12 12 23 12 12 12 23 22 22 22 36 23 23 23 38 12 12 12 23 23 23 23 38 13 13 13 25 13 13 13 25 23 23 23 38 24 24 24 39 13 13 13 25 24 24 24 39 14 14 14 26 14 14 14 26 24 24 24 39 25 25 25 40 14 14 14 26 25 25 25 40 15 15 15 27 15 15 15 27 25 25 25 40 26 26 26 41 15 15 15 27 26 26 26 41 16 16 16 28 16 16 16 28 26 26 26 41 27 27 27 42 16 16 16 28 27 27 27 42 17 17 17 29 17 17 17 29 27 27 27 42 28 28 28 43 17 17 17 29 28 28 28 43 18 18 18 30 18 18 18 30 28 28 28 43 29 29 29 44 18 18 18 30 29 29 29 44 19 19 19 31 19 19 19 31 29 29 29 44 30 30 30 45 19 19 19 31 30 30 30 45 20 20 20 32 20 20 20 32 30 30 30 45 21 21 21 46 20 20 20 32 21 21 21 46 11 11 11 33 21 21 58 47 31 31 59 48 32 32 32 49 21 21 60 50 32 32 32 49 22 22 22 36 22 22 22 36 32 32 32 49 33 33 33 51 22 22 22 36 33 33 33 51 23 23 23 38 23 23 23 38 33 33 33 51 34 34 34 52 23 23 23 38 34 34 34 52 24 24 24 39 24 24 24 39 34 34 34 52 35 35 35 53 24 24 24 39 35 35 35 53 25 25 25 40 25 25 25 40 35 35 35 53 36 36 36 54 25 25 25 40 36 36 36 54 26 26 26 41 26 26 26 41 36 36 36 54 37 37 37 55 26 26 26 41 37 37 37 55 27 27 27 42 27 27 27 42 37 37 37 55 38 38 38 56 27 27 27 42 38 38 38 56 28 28 28 43 28 28 28 43 38 38 38 56 39 39 39 57 28 28 28 43 39 39 39 57 29 29 29 44 29 29 29 44 39 39 39 57 40 40 40 58 29 29 29 44 40 40 40 58 30 30 30 45 30 30 30 45 40 40 40 58 31 31 31 59 30 30 30 45 31 31 31 59 21 21 21 46 41 41 61 60 32 32 32 49 31 31 62 61 41 41 63 62 33 33 33 51 32 32 32 49 41 41 64 63 34 34 34 52 33 33 33 51 41 41 65 64 35 35 35 53 34 34 34 52 41 41 66 65 36 36 36 54 35 35 35 53 41 41 67 66 37 37 37 55 36 36 36 54 41 41 68 67 38 38 38 56 37 37 37 55 41 41 69 68 39 39 39 57 38 38 38 56 41 41 70 69 40 40 40 58 39 39 39 57 41 41 41 70 31 31 31 59 40 40 40 58

+
+
+
+ + + + 0 0 5 -1.54543e-7 3.535534 3.535534 -2.5 2.5 3.535534 -3.535534 -3.09086e-7 3.535534 -2.5 -2.5 3.535534 4.21608e-8 -3.535534 3.535534 2.5 -2.5 3.535534 3.535534 -1.0677e-6 3.535534 2.500001 2.499999 3.535534 -2.18557e-7 5 -2.18557e-7 -3.535534 3.535534 -2.18557e-7 -5 -4.37114e-7 -2.18557e-7 -3.535533 -3.535534 -2.18557e-7 5.96244e-8 -5 -2.18557e-7 3.535533 -3.535534 -2.18557e-7 5 -1.50996e-6 -2.18557e-7 3.535536 3.535532 -2.18557e-7 -1.54543e-7 3.535534 -3.535534 -2.5 2.5 -3.535534 -3.535534 -3.09086e-7 -3.535534 -2.5 -2.5 -3.535534 4.21608e-8 -3.535534 -3.535534 2.5 -2.5 -3.535534 3.535534 -1.0677e-6 -3.535534 2.500001 2.499999 -3.535534 0 0 -5 + + + + + + + + + + 9.88537e-9 3.95415e-8 1 6.9026e-8 0.7486158 0.6630041 -0.5293514 0.5293513 0.6630041 -0.7486159 -8.05304e-8 0.6630041 -0.5293513 -0.5293514 0.663004 1.15043e-8 -0.7486158 0.6630041 0.5293513 -0.5293514 0.6630041 0.7486158 -2.01326e-7 0.6630041 0.5293515 0.5293512 0.6630041 7.27742e-8 1 -1.2129e-8 -0.7071067 0.7071068 -3.63871e-8 -1 -9.70323e-8 -1.81936e-8 -0.7071068 -0.7071068 -1.2129e-8 0 -1 3.03226e-8 0.7071066 -0.7071069 0 1 -3.21419e-7 -4.24516e-8 0.7071069 0.7071065 -1.2129e-8 6.32739e-8 0.7486157 -0.6630041 -0.5293513 0.5293513 -0.6630042 -0.7486158 -6.9026e-8 -0.6630042 -0.5293512 -0.5293514 -0.663004 2.30087e-8 -0.7486158 -0.6630041 0.5293512 -0.5293514 -0.6630041 0.7486158 -1.86945e-7 -0.6630042 0.5293514 0.5293511 -0.6630041 9.88537e-9 2.82439e-8 -1 + + + + + + + + + + 0.5 0.5 5.5 0.5000007 4.035534 4.035534 -2 3 4.035534 -3.035534 0.5000005 4.035534 -2 -2 4.035534 0.4999992 -3.035534 4.035534 2.999999 -2.000001 4.035534 4.035534 0.4999981 4.035534 3.000002 2.999998 4.035534 0.500001 5.5 0.4999998 -3.035533 4.035535 0.4999998 -4.5 0.5000008 0.4999998 -3.035534 -3.035533 0.4999998 0.4999989 -4.5 0.4999998 4.035532 -3.035535 0.4999998 5.5 0.4999973 0.4999998 4.035537 4.035532 0.4999998 0.5000007 4.035534 -3.035534 -2 3 -3.035534 -3.035534 0.5000005 -3.035534 -2 -2 -3.035534 0.4999992 -3.035534 -3.035534 2.999999 -2.000001 -3.035534 4.035534 0.4999981 -3.035534 3.000002 2.999998 -3.035534 0.5 0.5 -4.5 + + + + + + + + + + 0.954739 2.15833e-7 -9.43795e-9 0.8185035 -0.07019225 0.07925587 0.7049205 -0.02852993 0.5855967 0.6144843 1.61232e-7 0.6938309 0.7364077 -0.004867014 0.5840719 0.8185036 -0.07019225 -0.07925597 0.7049205 -0.02852995 -0.5855966 0.6144844 1.36677e-7 -0.6938309 0.7364076 -0.004866982 -0.584072 0.7071067 -5.4318e-8 -0.2357023 0.2724478 0.2724477 -0.03612882 -1.08617e-14 7.48297e-8 -5.34923e-9 0.2724474 -0.2724474 0.03612879 0.7071068 7.1471e-9 0.2357022 0.2724478 0.2724477 0.03612882 3.23075e-14 2.23624e-7 1.56345e-8 0.2724472 -0.2724473 -0.03612873 0.8185034 0.07019258 0.07925641 0.7364079 0.004867376 -0.5840717 0.6144844 1.60997e-7 -0.6938308 0.7049204 0.02853028 -0.5855968 0.8185035 0.07019259 -0.07925631 0.736408 0.004867405 0.5840716 0.6144844 1.54593e-7 0.6938308 0.7049204 0.02853028 0.5855969 0.954739 2.15833e-7 9.43795e-9 + + + + + + + + + + 2.26065e-7 -1 3.95415e-8 -0.1282771 -0.6575266 0.742431 -0.3587224 -0.8478319 0.3905115 1.75624e-7 -1 7.68394e-8 0.3255071 -0.8483869 -0.4174744 -0.1282772 -0.6575266 -0.742431 -0.3587225 -0.8478319 -0.3905116 -5.29431e-8 -1 -2.43878e-7 0.325507 -0.848387 0.4174741 0.3162278 -1.15066e-8 0.9486833 0.06601453 0.06601457 0.9956325 -2.5066e-8 0.07130344 0.9974547 0.06601458 -0.06601456 -0.9956325 0.3162277 -2.87665e-8 -0.9486833 0.06601455 0.06601453 -0.9956325 -1.99311e-8 0.06974413 -0.9975649 0.06601449 -0.06601451 0.9956325 -0.1282779 0.6575266 0.7424309 0.3255066 0.848387 0.4174746 -1.66844e-7 1 8.42766e-8 -0.3587228 0.8478319 -0.3905113 -0.1282778 0.6575265 -0.7424309 0.3255067 0.8483869 -0.4174747 2.93614e-8 1 -2.48815e-7 -0.3587227 0.847832 0.3905111 -2.26065e-7 1 2.82439e-8 + + + + + + + + + + + + + + + + + +

0 0 0 0 1 1 1 1 2 2 2 2 0 0 0 0 2 2 2 2 3 3 3 3 0 0 0 0 3 3 3 3 4 4 4 4 0 0 0 0 4 4 4 4 5 5 5 5 0 0 0 0 5 5 5 5 6 6 6 6 0 0 0 0 6 6 6 6 7 7 7 7 0 0 0 0 7 7 7 7 8 8 8 8 0 0 0 0 8 8 8 8 1 1 1 1 1 1 1 1 9 9 9 9 10 10 10 10 1 1 1 1 10 10 10 10 2 2 2 2 2 2 2 2 10 10 10 10 11 11 11 11 2 2 2 2 11 11 11 11 3 3 3 3 3 3 3 3 11 11 11 11 12 12 12 12 3 3 3 3 12 12 12 12 4 4 4 4 4 4 4 4 12 12 12 12 13 13 13 13 4 4 4 4 13 13 13 13 5 5 5 5 5 5 5 5 13 13 13 13 14 14 14 14 5 5 5 5 14 14 14 14 6 6 6 6 6 6 6 6 14 14 14 14 15 15 15 15 6 6 6 6 15 15 15 15 7 7 7 7 7 7 7 7 15 15 15 15 16 16 16 16 7 7 7 7 16 16 16 16 8 8 8 8 8 8 8 8 16 16 16 16 9 9 9 9 8 8 8 8 9 9 9 9 1 1 1 1 9 9 9 9 17 17 17 17 18 18 18 18 9 9 9 9 18 18 18 18 10 10 10 10 10 10 10 10 18 18 18 18 19 19 19 19 10 10 10 10 19 19 19 19 11 11 11 11 11 11 11 11 19 19 19 19 20 20 20 20 11 11 11 11 20 20 20 20 12 12 12 12 12 12 12 12 20 20 20 20 21 21 21 21 12 12 12 12 21 21 21 21 13 13 13 13 13 13 13 13 21 21 21 21 22 22 22 22 13 13 13 13 22 22 22 22 14 14 14 14 14 14 14 14 22 22 22 22 23 23 23 23 14 14 14 14 23 23 23 23 15 15 15 15 15 15 15 15 23 23 23 23 24 24 24 24 15 15 15 15 24 24 24 24 16 16 16 16 16 16 16 16 24 24 24 24 17 17 17 17 16 16 16 16 17 17 17 17 9 9 9 9 25 25 25 25 18 18 18 18 17 17 17 17 25 25 25 25 19 19 19 19 18 18 18 18 25 25 25 25 20 20 20 20 19 19 19 19 25 25 25 25 21 21 21 21 20 20 20 20 25 25 25 25 22 22 22 22 21 21 21 21 25 25 25 25 23 23 23 23 22 22 22 22 25 25 25 25 24 24 24 24 23 23 23 23 25 25 25 25 17 17 17 17 24 24 24 24

+
+
+
+ + + + 0 0 5 -1.89276e-7 4.330127 2.5 -3.75 2.165064 2.5 -3.75 -2.165064 2.5 5.16362e-8 -4.330127 2.5 3.75 -2.165064 2.5 3.750001 2.165062 2.5 -1.89276e-7 4.330127 -2.5 -3.75 2.165064 -2.5 -3.75 -2.165063 -2.5 5.16362e-8 -4.330127 -2.5 3.75 -2.165064 -2.5 3.750001 2.165062 -2.5 0 0 -5 + + + + + + + + + + -1.99952e-8 1.33301e-8 1 7.03834e-8 0.8973439 0.441332 -0.7771226 0.448672 0.441332 -0.7771226 -0.448672 0.441332 -3.51917e-8 -0.8973439 0.441332 0.7771224 -0.4486721 0.441332 0.7771227 0.4486718 0.441332 8.44601e-8 0.8973438 -0.4413321 -0.7771226 0.4486719 -0.4413322 -0.7771226 -0.4486719 -0.4413321 -4.92684e-8 -0.8973439 -0.4413321 0.7771225 -0.4486721 -0.4413321 0.7771227 0.4486717 -0.4413321 -6.66506e-9 1.33301e-8 -1 + + + + + + + + + + 0.9166666 1 0.999001 0.9999999 0.6666667 0.9990011 0.1666667 0.6666666 0.9990012 0.3333333 0.6666667 0.9990011 0.5 0.6666667 0.9990011 0.6666666 0.6666667 0.999001 0.8333333 0.6666667 0.999001 0.9999999 0.3333333 0.999001 0.1666666 0.3333333 0.9990011 0.3333333 0.3333333 0.9990011 0.5 0.3333333 0.999001 0.6666666 0.3333333 0.999001 0.8333332 0.3333333 0.9990009 0.9166666 0 0.999001 0.08333331 1 0.999001 -5.96046e-8 0.6666667 0.9990011 0.25 1 0.999001 0.4166666 1 0.999001 0.5833333 1 0.999001 0.7499999 1 0.999001 -5.96046e-8 0.6666667 0.9990011 -5.96046e-8 0.3333333 0.999001 -5.96046e-8 0.6666667 0.9990011 0.08333328 0 0.999001 -5.96046e-8 0.3333333 0.999001 0.25 0 0.999001 0.4166666 0 0.999001 0.5833333 0 0.999001 0.7499999 0 0.999001 + + + + + + + + + + -0.8660253 -0.5000002 -1.06513e-8 -0.8660252 -0.09738706 0.1980136 -0.4161448 -0.7597387 0.03960266 -3.09715e-7 -1 1.33301e-8 0.4498806 -0.7402613 0.03960252 0.8660254 -0.5 2.39814e-8 0.8660254 0.01947738 0.03960269 0.8660254 0.4999999 1.06513e-8 0.416145 0.7597387 0.03960266 3.30363e-7 1 -1.33301e-8 -0.4498804 0.7402614 0.03960264 -0.8660253 0.5000001 -2.39814e-8 -0.8660254 0.09738707 -0.1980133 -0.8660254 -0.09738693 0.1980133 -0.8660254 -0.09738697 -0.1980133 -0.4498806 -0.7402613 0.03960274 -0.8660254 -0.09738709 0.1980137 0.4161448 -0.7597387 0.03960259 0.8660254 -0.01947747 0.03960272 0.4498808 0.7402612 0.03960273 -0.4161446 0.7597387 0.0396026 -0.8660254 0.09738708 0.1980132 -0.8660254 -0.5 -8.92948e-10 -0.8660254 -0.09738697 -0.1980133 0 -1 -1.33301e-8 0.8660254 -0.5 -1.24372e-8 0.8660255 0.4999998 8.92944e-10 2.75302e-7 1 1.33301e-8 -0.8660254 0.5 1.24372e-8 + + + + + + + + + + -0.5000002 0.8660253 -2.15418e-8 -0.2469142 0.4276673 -0.8695597 -0.4071567 0.176304 -0.896181 -1 3.09715e-7 -1.99952e-8 -0.3562622 -0.2644559 -0.896181 -0.5 -0.8660254 1.54663e-9 0.05089461 -0.4407601 -0.896181 0.4999999 -0.8660254 2.15418e-8 0.4071567 -0.1763041 -0.8961809 1 -3.30363e-7 1.99952e-8 0.3562622 0.2644559 -0.896181 0.5000001 0.8660253 -1.54663e-9 0.2469139 0.4276673 -0.8695598 -0.2469138 0.4276673 -0.8695598 0.2469139 -0.4276674 -0.8695598 0.3562622 -0.2644562 -0.8961809 -0.2469142 0.4276672 -0.8695597 0.4071568 0.1763041 -0.8961809 0.05089469 0.4407602 -0.8961809 -0.3562621 0.2644562 -0.8961809 -0.4071568 -0.176304 -0.8961809 -0.2469138 -0.4276673 -0.8695598 0.5 -0.8660254 -1.48767e-8 0.2469139 -0.4276674 -0.8695598 1 0 -6.66506e-9 0.5 0.8660254 8.21169e-9 -0.4999998 0.8660255 1.48767e-8 -1 2.75302e-7 6.66506e-9 -0.5 -0.8660254 -8.21169e-9 + + + + + + + + + + + + + + + + + +

0 0 14 0 1 1 15 1 2 2 2 2 0 0 16 3 2 2 2 2 3 3 3 4 0 0 17 5 3 3 3 4 4 4 4 6 0 0 18 7 4 4 4 6 5 5 5 8 0 0 19 9 5 5 5 8 6 6 6 10 0 0 0 11 6 6 6 10 1 1 1 12 1 1 20 13 7 7 21 14 8 8 8 15 1 1 22 16 8 8 8 15 2 2 2 2 2 2 2 2 8 8 8 15 9 9 9 17 2 2 2 2 9 9 9 17 3 3 3 4 3 3 3 4 9 9 9 17 10 10 10 18 3 3 3 4 10 10 10 18 4 4 4 6 4 4 4 6 10 10 10 18 11 11 11 19 4 4 4 6 11 11 11 19 5 5 5 8 5 5 5 8 11 11 11 19 12 12 12 20 5 5 5 8 12 12 12 20 6 6 6 10 6 6 6 10 12 12 12 20 7 7 7 21 6 6 6 10 7 7 7 21 1 1 1 12 13 13 23 22 8 8 8 15 7 7 24 23 13 13 25 24 9 9 9 17 8 8 8 15 13 13 26 25 10 10 10 18 9 9 9 17 13 13 27 26 11 11 11 19 10 10 10 18 13 13 28 27 12 12 12 20 11 11 11 19 13 13 13 28 7 7 7 21 12 12 12 20

+
+
+
+
+ + + + + 0 0 0 + + + + + + + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + +
\ No newline at end of file diff --git a/Templates/Full/game/art/environment/LightVolume_Sphere.cs b/Templates/Full/game/art/environment/LightVolume_Sphere.cs new file mode 100644 index 000000000..475da3bee --- /dev/null +++ b/Templates/Full/game/art/environment/LightVolume_Sphere.cs @@ -0,0 +1,8 @@ + +singleton TSShapeConstructor(LightVolume_SphereDAE) +{ + baseShape = "./LightVolume_Sphere.DAE"; + lodType = "TrailingNumber"; + neverImport = "env*"; + loadLights = "0"; +}; diff --git a/Templates/Full/game/art/environment/LightVolume_Sphere.dts b/Templates/Full/game/art/environment/LightVolume_Sphere.dts new file mode 100644 index 000000000..223993dd6 Binary files /dev/null and b/Templates/Full/game/art/environment/LightVolume_Sphere.dts differ diff --git a/Templates/Full/game/core/scripts/client/postFx/glow.cs b/Templates/Full/game/core/scripts/client/postFx/glow.cs index 3cc946b04..78c46e56d 100644 --- a/Templates/Full/game/core/scripts/client/postFx/glow.cs +++ b/Templates/Full/game/core/scripts/client/postFx/glow.cs @@ -106,3 +106,79 @@ singleton PostEffect( GlowPostFx ) target = "$backBuffer"; }; }; + +singleton ShaderData( PFX_VolFogGlowBlurVertShader ) +{ + DXVertexShaderFile = "shaders/common/postFx/glowBlurV.hlsl"; + DXPixelShaderFile = "shaders/common/postFx/VolFogGlowP.hlsl"; + + OGLVertexShaderFile = "shaders/common/postFx/gl/glowBlurV.glsl"; + OGLPixelShaderFile = "shaders/common/postFx/gl/VolFogGlowP.glsl"; + + defines = "BLUR_DIR=float2(0.0,1.0)"; + samplerNames[0] = "$diffuseMap"; + pixVersion = 2.0; +}; +singleton ShaderData( PFX_VolFogGlowBlurHorzShader : PFX_VolFogGlowBlurVertShader ) +{ + DXVertexShaderFile = "shaders/common/postFx/glowBlurV.hlsl"; + DXPixelShaderFile = "shaders/common/postFx/VolFogGlowP.hlsl"; + + OGLVertexShaderFile = "shaders/common/postFx/gl/glowBlurV.glsl"; + OGLPixelShaderFile = "shaders/common/postFx/gl/VolFogGlowP.glsl"; + + defines = "BLUR_DIR=float2(1.0,0.0)"; +}; + +$VolFogGlowPostFx::glowStrength = 0.3; + +singleton PostEffect( VolFogGlowPostFx ) +{ + // Do not allow the glow effect to work in reflection + // passes by default so we don't do the extra drawing. + allowReflectPass = false; + renderTime = "PFXAfterBin"; + renderBin = "FogBin"; + renderPriority = 1; + // First we down sample the glow buffer. + shader = PFX_PassthruShader; + stateBlock = PFX_DefaultStateBlock; + texture[0] = "$backbuffer"; + target = "$outTex"; + targetScale = "0.5 0.5"; + isEnabled = true; + // Blur vertically + new PostEffect() + { + shader = PFX_VolFogGlowBlurVertShader; + stateBlock = PFX_DefaultStateBlock; + internalName = "vert"; + texture[0] = "$inTex"; + target = "$outTex"; + }; + // Blur horizontally + new PostEffect() + { + shader = PFX_VolFogGlowBlurHorzShader; + stateBlock = PFX_DefaultStateBlock; + internalName = "hor"; + texture[0] = "$inTex"; + target = "$outTex"; + }; + // Upsample and combine with the back buffer. + new PostEffect() + { + shader = PFX_PassthruShader; + stateBlock = PFX_GlowCombineStateBlock; + texture[0] = "$inTex"; + target = "$backBuffer"; + }; +}; + +function VolFogGlowPostFx::setShaderConsts( %this ) +{ + %vp=%this-->vert; + %vp.setShaderConst( "$strength", $VolFogGlowPostFx::glowStrength ); + %vp=%this-->hor; + %vp.setShaderConst( "$strength", $VolFogGlowPostFx::glowStrength ); +} \ No newline at end of file diff --git a/Templates/Full/game/core/scripts/client/postFx/postFxManager.gui.settings.cs b/Templates/Full/game/core/scripts/client/postFx/postFxManager.gui.settings.cs index d30d2314b..77d664f41 100644 --- a/Templates/Full/game/core/scripts/client/postFx/postFxManager.gui.settings.cs +++ b/Templates/Full/game/core/scripts/client/postFx/postFxManager.gui.settings.cs @@ -70,6 +70,7 @@ function PostFXManager::settingsSetEnabled(%this, %bEnablePostFX) postVerbose("% - PostFX Manager - PostFX disabled"); } + VolFogGlowPostFx.disable(); } function PostFXManager::settingsEffectSetEnabled(%this, %sName, %bEnable) diff --git a/Templates/Full/game/core/scripts/client/renderManager.cs b/Templates/Full/game/core/scripts/client/renderManager.cs index dcd1628fe..5734bbce6 100644 --- a/Templates/Full/game/core/scripts/client/renderManager.cs +++ b/Templates/Full/game/core/scripts/client/renderManager.cs @@ -75,6 +75,8 @@ function initRenderManager() DiffuseRenderPassManager.addManager( new RenderParticleMgr() { renderOrder = 1.35; processAddOrder = 1.35; } ); DiffuseRenderPassManager.addManager( new RenderTranslucentMgr() { renderOrder = 1.4; processAddOrder = 1.4; } ); + DiffuseRenderPassManager.addManager(new RenderObjectMgr(FogBin){ bintype = "ObjectVolumetricFog"; renderOrder = 1.45; processAddOrder = 1.45; } ); + // Note that the GlowPostFx is triggered after this bin. DiffuseRenderPassManager.addManager( new RenderGlowMgr(GlowBin) { renderOrder = 1.5; processAddOrder = 1.5; } ); diff --git a/Templates/Full/game/core/scripts/client/shaders.cs b/Templates/Full/game/core/scripts/client/shaders.cs index 98d0529eb..002053a1a 100644 --- a/Templates/Full/game/core/scripts/client/shaders.cs +++ b/Templates/Full/game/core/scripts/client/shaders.cs @@ -101,4 +101,40 @@ new ShaderData( fxFoliageReplicatorShader ) samplerNames[1] = "$alphaMap"; pixVersion = 1.4; +}; + +singleton ShaderData( VolumetricFogPrePassShader ) +{ + DXVertexShaderFile = "shaders/common/VolumetricFog/VFogPreV.hlsl"; + DXPixelShaderFile = "shaders/common/VolumetricFog/VFogPreP.hlsl"; + + OGLVertexShaderFile = "shaders/common/VolumetricFog/gl/VFogPreV.glsl"; + OGLPixelShaderFile = "shaders/common/VolumetricFog/gl/VFogPreP.glsl"; + + pixVersion = 3.0; +}; +singleton ShaderData( VolumetricFogShader ) +{ + DXVertexShaderFile = "shaders/common/VolumetricFog/VFogV.hlsl"; + DXPixelShaderFile = "shaders/common/VolumetricFog/VFogP.hlsl"; + + OGLVertexShaderFile = "shaders/common/VolumetricFog/gl/VFogV.glsl"; + OGLPixelShaderFile = "shaders/common/VolumetricFog/gl/VFogP.glsl"; + + samplerNames[0] = "$prepassTex"; + samplerNames[1] = "$depthBuffer"; + samplerNames[2] = "$frontBuffer"; + samplerNames[3] = "$density"; + + pixVersion = 3.0; +}; +singleton ShaderData( VolumetricFogReflectionShader ) +{ + DXVertexShaderFile = "shaders/common/VolumetricFog/VFogPreV.hlsl"; + DXPixelShaderFile = "shaders/common/VolumetricFog/VFogRefl.hlsl"; + + OGLVertexShaderFile = "shaders/common/VolumetricFog/gl/VFogPreV.glsl"; + OGLPixelShaderFile = "shaders/common/VolumetricFog/gl/VFogRefl.glsl"; + + pixVersion = 3.0; }; \ No newline at end of file diff --git a/Templates/Full/game/scripts/server/VolumetricFog.cs b/Templates/Full/game/scripts/server/VolumetricFog.cs new file mode 100644 index 000000000..53e03adf3 --- /dev/null +++ b/Templates/Full/game/scripts/server/VolumetricFog.cs @@ -0,0 +1,106 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +function VolumetricFog::onEnterFog(%this,%obj) +{ + // This method is called whenever the control object (Camera or Player) + // %obj enters the fog area. + + // echo("Control Object " @ %obj @ " enters fog " @ %this); +} + +function VolumetricFog::onLeaveFog(%this,%obj) +{ + // This method is called whenever the control object (Camera or Player) + // %obj leaves the fog area. + + // echo("Control Object " @ %obj @ " left fog " @ %this); +} + +function VolumetricFog::Dissolve(%this,%speed,%delete) +{ + // This method dissolves the fog at speed milliseconds + %this.isBuilding = true; + if (%this.FogDensity > 0) + { + %this.setFogDensity(%this.FogDensity - 0.005); + %this.schedule(%speed,Dissolve,%speed,%delete); + } + else + { + %this.isBuilding = false; + %this.SetFogDensity(0.0); + if (%delete !$= "" && %delete !$="0" && %delete !$="false") + %this.schedule(250,delete); + } +} + +function VolumetricFog::Thicken(%this,%speed, %end_density) +{ + // This method thickens the fog at speed milliseconds to a density of %end_density + + %this.isBuilding = true; + if (%this.FogDensity + 0.005 < %end_density) + { + %this.setFogDensity(%this.FogDensity + 0.005); + %this.schedule(%speed,Thicken,%speed, %end_density); + } + else + { + %this.setFogDensity(%end_density); + %this.isBuilding = false; + } +} + +function GenerateFog(%pos,%scale,%color,%density) +{ + // This function can be used to generate some fog caused by massive gunfire etc. + // Change shape and modulation data to your likings. + + %fog=new VolumetricFog() { + shapeName = "art/environment/Fog_Sphere.dts"; + fogColor = %color; + fogDensity = "0.0"; + ignoreWater = "0"; + MinSize = "250"; + FadeSize = "750"; + texture = "art/environment/FogMod_heavy.dds"; + tiles = "1"; + modStrength = "0.2"; + PrimSpeed = "-0.01 0.04"; + SecSpeed = "0.02 0.02"; + position = %pos; + rotation = "0 0 1 20.354"; + scale = %scale; + canSave = "1"; + canSaveDynamicFields = "1"; + }; + + if (isObject(%fog)) + { + MissionCleanup.add(%fog); + + %fog.Thicken(500,%density); + } + + return %fog; +} \ No newline at end of file diff --git a/Templates/Full/game/scripts/server/scriptExec.cs b/Templates/Full/game/scripts/server/scriptExec.cs index 64d4adc06..26f4f8280 100644 --- a/Templates/Full/game/scripts/server/scriptExec.cs +++ b/Templates/Full/game/scripts/server/scriptExec.cs @@ -24,6 +24,7 @@ // a server is constructed. exec("./camera.cs"); exec("./triggers.cs"); +exec("./VolumetricFog.cs"); exec("./inventory.cs"); exec("./shapeBase.cs"); exec("./item.cs"); diff --git a/Templates/Full/game/shaders/common/VolumetricFog/VFogP.hlsl b/Templates/Full/game/shaders/common/VolumetricFog/VFogP.hlsl new file mode 100644 index 000000000..aaadbf479 --- /dev/null +++ b/Templates/Full/game/shaders/common/VolumetricFog/VFogP.hlsl @@ -0,0 +1,87 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog final pixel shader V2.00 + +#include "shadergen:/autogenConditioners.h" +#include "../torque.hlsl" + +uniform sampler2D prepassTex : register(S0); +uniform sampler2D depthBuffer : register(S1); +uniform sampler2D frontBuffer : register(S2); +uniform sampler2D density : register(S3); + +uniform float accumTime; +uniform float4 fogColor; +uniform float fogDensity; +uniform float preBias; +uniform float textured; +uniform float modstrength; +uniform float4 modspeed;//xy speed layer 1, zw speed layer 2 +uniform float2 viewpoint; +uniform float2 texscale; +uniform float3 ambientColor; +uniform float numtiles; +uniform float fadesize; +uniform float2 PixelSize; + +struct ConnectData +{ + float4 hpos : POSITION; + float4 htpos : TEXCOORD0; + float2 uv0 : TEXCOORD1; +}; + +float4 main( ConnectData IN ) : COLOR0 +{ + float2 uvscreen=((IN.htpos.xy/IN.htpos.w) + 1.0 ) / 2.0; + uvscreen.y = 1.0 - uvscreen.y; + + float obj_test = prepassUncondition( prepassTex, uvscreen).w * preBias; + float depth = tex2D(depthBuffer,uvscreen).r; + float front = tex2D(frontBuffer,uvscreen).r; + + if (depth <= front) + return float4(0,0,0,0); + else if ( obj_test < depth ) + depth = obj_test; + if ( front >= 0.0) + depth -= front; + + float diff = 1.0; + float3 col = fogColor.rgb; + if (textured != 0.0) + { + float2 offset = viewpoint + ((-0.5 + (texscale * uvscreen)) * numtiles); + + float2 mod1 = tex2D(density,(offset + (modspeed.xy*accumTime))).rg; + float2 mod2= tex2D(density,(offset + (modspeed.zw*accumTime))).rg; + diff = (mod2.r + mod1.r) * modstrength; + col *= (2.0 - ((mod1.g + mod2.g) * fadesize))/2.0; + } + + col *= ambientColor; + + float4 resultColor = float4(col, 1.0 - saturate(exp(-fogDensity * depth * diff * fadesize))); + + return hdrEncode(resultColor); +} diff --git a/Templates/Full/game/shaders/common/VolumetricFog/VFogPreP.hlsl b/Templates/Full/game/shaders/common/VolumetricFog/VFogPreP.hlsl new file mode 100644 index 000000000..bb06f5f7c --- /dev/null +++ b/Templates/Full/game/shaders/common/VolumetricFog/VFogPreP.hlsl @@ -0,0 +1,39 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog prepass pixel shader V1.00 + +struct ConnectData +{ + float4 hpos : POSITION; + float4 pos : TEXCOORD0; +}; + +float4 main( ConnectData IN ) : COLOR0 +{ + float OUT; + + clip( IN.pos.w ); + OUT = IN.pos.w; + + return float4(OUT,0,0,1); +} diff --git a/Templates/Full/game/shaders/common/VolumetricFog/VFogPreV.hlsl b/Templates/Full/game/shaders/common/VolumetricFog/VFogPreV.hlsl new file mode 100644 index 000000000..2d13cdf01 --- /dev/null +++ b/Templates/Full/game/shaders/common/VolumetricFog/VFogPreV.hlsl @@ -0,0 +1,46 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog prepass vertex shader V1.00 + +#include "shaders/common/hlslstructs.h" + +struct ConnectData +{ + float4 hpos : POSITION; + float4 pos : TEXCOORD0; +}; + +uniform float4x4 modelView; + +ConnectData main( VertexIn_P IN) +{ + ConnectData OUT; + + float4 inPos = IN.pos; + inPos.w = 1.0; + + OUT.hpos = mul( modelView, inPos ); + OUT.pos = OUT.hpos; + + return OUT; +} diff --git a/Templates/Full/game/shaders/common/VolumetricFog/VFogRefl.hlsl b/Templates/Full/game/shaders/common/VolumetricFog/VFogRefl.hlsl new file mode 100644 index 000000000..bd9866cf8 --- /dev/null +++ b/Templates/Full/game/shaders/common/VolumetricFog/VFogRefl.hlsl @@ -0,0 +1,37 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog Reflection pixel shader V1.00 +uniform float4 fogColor; +uniform float fogDensity; +uniform float reflStrength; + +struct ConnectData +{ + float4 hpos : POSITION; + float4 pos : TEXCOORD0; +}; + +float4 main( ConnectData IN ) : COLOR0 +{ + return float4(fogColor.rgb,saturate(fogDensity*reflStrength)); +} diff --git a/Templates/Full/game/shaders/common/VolumetricFog/VFogV.hlsl b/Templates/Full/game/shaders/common/VolumetricFog/VFogV.hlsl new file mode 100644 index 000000000..7f86802b5 --- /dev/null +++ b/Templates/Full/game/shaders/common/VolumetricFog/VFogV.hlsl @@ -0,0 +1,45 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog final vertex shader V1.00 + +#include "shaders/common/hlslstructs.h" + +struct ConnectData +{ + float4 hpos : POSITION; + float4 htpos : TEXCOORD0; + float2 uv0 : TEXCOORD1; +}; + +uniform float4x4 modelView; + +ConnectData main( VertexIn_PNT IN) +{ + ConnectData OUT; + + OUT.hpos = mul(modelView, IN.pos); + OUT.htpos = OUT.hpos; + OUT.uv0 = IN.uv0; + + return OUT; +} diff --git a/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogP.glsl b/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogP.glsl new file mode 100644 index 000000000..7895d9e2d --- /dev/null +++ b/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogP.glsl @@ -0,0 +1,87 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#include "../../gl/hlslCompat.glsl" +#include "shadergen:/autogenConditioners.h" +#include "../../gl/torque.glsl" + +uniform sampler2D prepassTex; +uniform sampler2D depthBuffer; +uniform sampler2D frontBuffer; +uniform sampler2D density; + +uniform float accumTime; +uniform vec4 fogColor; +uniform float fogDensity; +uniform float preBias; +uniform float textured; +uniform float modstrength; +uniform vec4 modspeed;//xy speed layer 1, zw speed layer 2 +uniform vec2 viewpoint; +uniform vec2 texscale; +uniform vec3 ambientColor; +uniform float numtiles; +uniform float fadesize; +uniform vec2 PixelSize; + +in vec4 _hpos; +#define IN_hpos _hpos +out vec4 OUT_col; + +void main() +{ + vec2 uvscreen=((IN_hpos.xy/IN_hpos.w) + 1.0 ) / 2.0; + uvscreen.y = 1.0 - uvscreen.y; + + float obj_test = prepassUncondition( prepassTex, uvscreen).w * preBias; + float depth = tex2D(depthBuffer,uvscreen).r; + float front = tex2D(frontBuffer,uvscreen).r; + + if (depth <= front) + { + OUT_col = vec4(0,0,0,0); + return; + } + + else if ( obj_test < depth ) + depth = obj_test; + if ( front >= 0.0) + depth -= front; + + float diff = 1.0; + vec3 col = fogColor.rgb; + if (textured != 0.0) + { + vec2 offset = viewpoint + ((-0.5 + (texscale * uvscreen)) * numtiles); + + vec2 mod1 = tex2D(density,(offset + (modspeed.xy*accumTime))).rg; + vec2 mod2= tex2D(density,(offset + (modspeed.zw*accumTime))).rg; + diff = (mod2.r + mod1.r) * modstrength; + col *= (2.0 - ((mod1.g + mod2.g) * fadesize))/2.0; + } + + col *= ambientColor; + + vec4 returnColor = vec4(col, 1.0 - saturate(exp(-fogDensity * depth * diff * fadesize))); + + OUT_col = hdrEncode(returnColor); +} diff --git a/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogPreP.glsl b/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogPreP.glsl new file mode 100644 index 000000000..017ea6ef8 --- /dev/null +++ b/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogPreP.glsl @@ -0,0 +1,37 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#include "../../gl/hlslCompat.glsl" + +in vec4 _hpos; +#define IN_hpos _hpos + +out vec4 OUT_col; + +void main() +{ + float OUT; + clip( IN_hpos.w ); + OUT = IN_hpos.w; + + OUT_col = vec4(OUT,0,0,1); +} diff --git a/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogPreV.glsl b/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogPreV.glsl new file mode 100644 index 000000000..2f2a1318a --- /dev/null +++ b/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogPreV.glsl @@ -0,0 +1,42 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#include "../../gl/hlslCompat.glsl" + +in vec4 vPosition; +#define IN_position vPosition + +out vec4 _hpos; +#define OUT_hpos _hpos + +uniform mat4 modelView; + +void main() +{ + vec4 inPos = IN_position; + inPos.w = 1.0; + + OUT_hpos = tMul( modelView, inPos ); + + gl_Position = OUT_hpos; + correctSSP(gl_Position); +} diff --git a/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogRefl.glsl b/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogRefl.glsl new file mode 100644 index 000000000..78e149fbf --- /dev/null +++ b/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogRefl.glsl @@ -0,0 +1,33 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#include "../../gl/hlslCompat.glsl" + +uniform vec4 fogColor; +uniform float fogDensity; +uniform float reflStrength; +out vec4 OUT_col; + +void main() +{ + OUT_col = vec4(fogColor.rgb,saturate(fogDensity*reflStrength)); +} diff --git a/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogV.glsl b/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogV.glsl new file mode 100644 index 000000000..57b3ba87e --- /dev/null +++ b/Templates/Full/game/shaders/common/VolumetricFog/gl/VFogV.glsl @@ -0,0 +1,38 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2012 GarageGames, LLC +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +#include "../../gl/hlslCompat.glsl" + +in vec4 vPosition; +#define IN_position vPosition + +out vec4 _hpos; +#define OUT_hpos _hpos + +uniform mat4 modelView; + +void main() +{ + OUT_hpos = tMul(modelView, IN_position); + gl_Position = OUT_hpos; + correctSSP(gl_Position); +} diff --git a/Templates/Full/game/shaders/common/postFx/VolFogGlowP.hlsl b/Templates/Full/game/shaders/common/postFx/VolFogGlowP.hlsl new file mode 100644 index 000000000..8a61b5928 --- /dev/null +++ b/Templates/Full/game/shaders/common/postFx/VolFogGlowP.hlsl @@ -0,0 +1,74 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2014 R.G.S. - Richards Game Studio, the Netherlands +// http://www.richardsgamestudio.com/ +// +// If you find this code useful or you are feeling particularly generous I +// would ask that you please go to http://www.richardsgamestudio.com/ then +// choose Donations from the menu on the left side and make a donation to +// Richards Game Studio. It will be highly appreciated. +// +// The MIT License: +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog Glow postFx pixel shader V1.00 + +#include "./postFx.hlsl" + +uniform sampler2D diffuseMap : register(S0); +uniform float strength; + +struct VertToPix +{ + float4 hpos : POSITION; + + float2 uv0 : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; + float2 uv3 : TEXCOORD3; + + float2 uv4 : TEXCOORD4; + float2 uv5 : TEXCOORD5; + float2 uv6 : TEXCOORD6; + float2 uv7 : TEXCOORD7; +}; + +float4 main( VertToPix IN ) : COLOR +{ + float4 kernel = float4( 0.175, 0.275, 0.375, 0.475 ) * strength; + + float4 OUT = 0; + OUT += tex2D( diffuseMap, IN.uv0 ) * kernel.x; + OUT += tex2D( diffuseMap, IN.uv1 ) * kernel.y; + OUT += tex2D( diffuseMap, IN.uv2 ) * kernel.z; + OUT += tex2D( diffuseMap, IN.uv3 ) * kernel.w; + + OUT += tex2D( diffuseMap, IN.uv4 ) * kernel.x; + OUT += tex2D( diffuseMap, IN.uv5 ) * kernel.y; + OUT += tex2D( diffuseMap, IN.uv6 ) * kernel.z; + OUT += tex2D( diffuseMap, IN.uv7 ) * kernel.w; + + // Calculate a lumenance value in the alpha so we + // can use alpha test to save fillrate. + float3 rgb2lum = float3( 0.30, 0.59, 0.11 ); + OUT.a = dot( OUT.rgb, rgb2lum ); + + return OUT; +} diff --git a/Templates/Full/game/shaders/common/postFx/gl/VolFogGlowP.glsl b/Templates/Full/game/shaders/common/postFx/gl/VolFogGlowP.glsl new file mode 100644 index 000000000..01b072dd9 --- /dev/null +++ b/Templates/Full/game/shaders/common/postFx/gl/VolFogGlowP.glsl @@ -0,0 +1,67 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2014 R.G.S. - Richards Game Studio, the Netherlands +// http://www.richardsgamestudio.com/ +// +// If you find this code useful or you are feeling particularly generous I +// would ask that you please go to http://www.richardsgamestudio.com/ then +// choose Donations from the menu on the left side and make a donation to +// Richards Game Studio. It will be highly appreciated. +// +// The MIT License: +// +// 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 without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +//----------------------------------------------------------------------------- + +// Volumetric Fog Glow postFx pixel shader V1.00 + +uniform sampler2D diffuseMap; +uniform float strength; + +out vec4 OUT_col; + +in vec2 uv0; +in vec2 uv1; +in vec2 uv2; +in vec2 uv3; + +in vec2 uv4; +in vec2 uv5; +in vec2 uv6; +in vec2 uv7; + +void main() +{ + vec4 kernel = vec4( 0.175, 0.275, 0.375, 0.475 ) * strength; + + OUT_col = vec4(0); + OUT_col += texture( diffuseMap, uv0 ) * kernel.x; + OUT_col += texture( diffuseMap, uv1 ) * kernel.y; + OUT_col += texture( diffuseMap, uv2 ) * kernel.z; + OUT_col += texture( diffuseMap, uv3 ) * kernel.w; + + OUT_col += texture( diffuseMap, uv4 ) * kernel.x; + OUT_col += texture( diffuseMap, uv5 ) * kernel.y; + OUT_col += texture( diffuseMap, uv6 ) * kernel.z; + OUT_col += texture( diffuseMap, uv7 ) * kernel.w; + + // Calculate a lumenance value in the alpha so we + // can use alpha test to save fillrate. + vec3 rgb2lum = vec3( 0.30, 0.59, 0.11 ); + OUT_col.a = dot( OUT_col.rgb, rgb2lum ); +} diff --git a/Templates/Full/game/tools/classIcons/VolumetricFog.png b/Templates/Full/game/tools/classIcons/VolumetricFog.png new file mode 100644 index 000000000..5dc516cb5 Binary files /dev/null and b/Templates/Full/game/tools/classIcons/VolumetricFog.png differ diff --git a/Templates/Full/game/tools/worldEditor/gui/objectBuilderGui.ed.gui b/Templates/Full/game/tools/worldEditor/gui/objectBuilderGui.ed.gui index ddf2ef68a..74f1200c6 100644 --- a/Templates/Full/game/tools/worldEditor/gui/objectBuilderGui.ed.gui +++ b/Templates/Full/game/tools/worldEditor/gui/objectBuilderGui.ed.gui @@ -980,7 +980,19 @@ function ObjectBuilderGui::buildObserverDropPoint(%this) //------------------------------------------------------------------------------ // System //------------------------------------------------------------------------------ - +function ObjectBuilderGui::buildVolumetricFog(%this) +{ + // Change this if you want to default to another Folder + // Otherwise every time you want to add a Fog you will go this. + %defShape = "/art/environment/Fog_Cube.dts"; + %this.lastPath=getMainDotCsDir() @ %defShape; + OBObjectName.setValue( "" ); + %this.objectClassName = "VolumetricFog"; + %this.addField( "shapeName", "TypeFile", "Shape (Fog volume)", "", "*.dts;*.dae"); + %this.addField("Scale", "TypePoint3", "Scale", "1 1 1"); + %this.addField("FogColor", "TypeColorI", "FogColor", "200 200 200 255"); + %this.process(); +} function ObjectBuilderGui::buildPhysicsEntity(%this) { %this.objectClassName = "PhysicsEntity"; diff --git a/Templates/Full/game/tools/worldEditor/scripts/editors/creator.ed.cs b/Templates/Full/game/tools/worldEditor/scripts/editors/creator.ed.cs index 9bc2cab15..6832410dd 100644 --- a/Templates/Full/game/tools/worldEditor/scripts/editors/creator.ed.cs +++ b/Templates/Full/game/tools/worldEditor/scripts/editors/creator.ed.cs @@ -46,6 +46,7 @@ function EWCreatorWindow::init( %this ) %this.registerMissionObject( "SFXEmitter", "Sound Emitter" ); %this.registerMissionObject( "Precipitation" ); %this.registerMissionObject( "ParticleEmitterNode", "Particle Emitter" ); + %this.registerMissionObject( "VolumetricFog", "Volumetric Fog" ); %this.registerMissionObject( "RibbonNode", "Ribbon" ); // Legacy features. Users should use Ground Cover and the Forest Editor.