Index: code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.cc
===================================================================
--- code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.cc	(revision 8435)
+++ code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.cc	(revision 8491)
@@ -30,8 +30,8 @@
  @file
  
- @brief Implementation of the GlobalGodrayShader.
+ @brief Implementation of the GlobalGodrayShader class.
  */
 
-#include "GlobalShader.h"
+#include "GlobalGodrayShader.h"
 
 #include "util/Exception.h"
@@ -43,5 +43,5 @@
     CreateFactory(GlobalGodrayShader);
     
-    GlobalGodrayShader::GlobalGodrayShader(BaseObject* creator, WorldEntity blurObject) : BaseObject(creator)
+    GlobalGodrayShader::GlobalGodrayShader(BaseObject* creator) : BaseObject(creator), globalShader_(creator)
     {
         RegisterObject(GlobalGodrayShader);
@@ -52,10 +52,18 @@
         //            ThrowException(AbortLoading, "Can't create GlobalGodrayShader, no scene manager given.");
         
-        if (this->getScene()->getSceneManager())
-            this- setSceneManager(this->getScene()->getSceneManager());
+        this->skyColor_ = {0.0f, 0.0f, 0.0f, 1.0f};
+        this->exposure_ = 1.0f;
+        this->decay_ = 0.1f;
+        this->density_ = 0.7f;
     }
     
-    GlobalGodrayShader::~GlobalShader()
+    GlobalGodrayShader::~GlobalGodrayShader()
     {
+        this->setVisible(false);
+    }
+    
+    void GlobalGodrayShader::tick(float dt)
+    {
+        // To-Do
     }
     
@@ -64,5 +72,39 @@
         SUPER(GlobalGodrayShader, XMLPort, xmlelement, mode);
         
-        XMLPortParamExtern(GlobalShader, Shader, &this->shader_, "compositor", setCompositorName, getCompositorName, xmlelement, mode);
+        XMLPortParamTemplate(GlobalGodrayShader, "sunPosition", setSunPosition, getSunPosition, xmlelement, mode, const Vector3&);
+        XMLPortParamTemplate(GlobalGodrayShader, "skyColor", setSkyColor, getSkyColor, xmlelement, mode, const Vector4&);
+        XMLPortParamVariable(GlobalGodrayShader, exposure_, "exposure", xmlelement, mode);
+        XMLPortParamVariable(GlobalGodrayShader, decay_, "decay", xmlelement, mode);
+        XMLPortParamVariable(GlobalGodrayShader, density_, "density", xmlelement, mode);
+    }
+    
+    void GlobalGodrayShader::setSunPosition(const Vector3& position)
+    {
+        this->sunPosition.x = position.x;
+        this->sunPosition.y = position.y;
+        this->sunPosition.z = position.z;
+    }
+    void GlobalGodrayShader::setSkyColor(const Vector4& color)
+    {
+        this->skyColor[0] = color.x;
+        this->skyColor[1] = color.y;
+        this->skyColor[2] = color.z;
+        this->skyColor[3] = color.w;
+    }
+    const Vector3& GlobalGodrayShader::getSunPosition() const
+    {
+        return sunPosition;
+    }
+    const Vector4& GlobalGodrayShader::getSkyColor() const
+    {
+        Vector4 &color = new Vector4(skyColor[0], skyColor[1], skyColor[2], skyColor[3]);
+        return color;
+    }
+    
+    void GlobalShader::changedVisibility()
+    {
+        SUPER(GlobalShader, changedVisibility);
+        
+        this->globalShader_.setVisible(this->isVisible());
     }
 }
Index: code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.h
===================================================================
--- code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.h	(revision 8435)
+++ code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.h	(revision 8491)
@@ -53,20 +53,31 @@
     class _OrxonoxExport GlobalGodrayShader : public BaseObject, public Tickable
     {
-    public:
-        GlobalGodrayShader(BaseObject* creator);
-        virtual ~GlobalGodrayShader();
+        public:
+            GlobalGodrayShader(BaseObject* creator);
+            virtual ~GlobalGodrayShader();
+            
+            virtual void tick(float dt);
+            
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
         
-        virtual void tick(float dt);
+            virtual void changedVisibility();
+            
+            inline const GlobalShader& getGlobalShader() const
+            { return this->globalShader_; }
         
-        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            void setSunPosition(const Vector3& position);
+            void setSkyColor(const Vector4& color);
+            const Vector3& getSunPosition() const;
+            const Vector4& getSkyColor() const;
         
-        inline const GlobalShader& getGlobalShader() const
-        { return this->globalShader_; }
-        
-    private:
-        
-        GlobalShader globalShader_;
-        Vector3 
-        
+        private:
+            
+            GlobalShader globalShader_;
+            
+            Vector3 sunPosition_;
+            float skyColor_[4];
+            float exposure_;
+            float decay_;
+            float density_;
     };
 }
Index: code/branches/environment2/src/orxonox/graphics/GlobalShader.cc
===================================================================
--- code/branches/environment2/src/orxonox/graphics/GlobalShader.cc	(revision 8435)
+++ code/branches/environment2/src/orxonox/graphics/GlobalShader.cc	(revision 8491)
@@ -38,5 +38,5 @@
     CreateFactory(GlobalShader);
 
-    GlobalShader::GlobalShader(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
+    GlobalShader::GlobalShader(BaseObject* creator) : BaseObject(creator), Synchronisable(creator), 
     {
         RegisterObject(GlobalShader);
@@ -51,4 +51,5 @@
 
         this->registerVariables();
+        
     }
 
