Index: code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.cc
===================================================================
--- code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.cc	(revision 8496)
+++ code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.cc	(revision 8497)
@@ -52,8 +52,10 @@
         //            ThrowException(AbortLoading, "Can't create GlobalGodrayShader, no scene manager given.");
         
-        this->skyColor_ = {0.0f, 0.0f, 0.0f, 1.0f};
+        this->skyColor_ = ColourValue::Black;
         this->exposure_ = 1.0f;
         this->decay_ = 0.1f;
         this->density_ = 0.7f;
+        
+        //// Init ////
     }
     
@@ -73,36 +75,30 @@
         
         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);
+        XMLPortParamTemplate(GlobalGodrayShader, "skyColor", setSkyColor, getSkyColor, xmlelement, mode, const ColourValue&);
+        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;
+        this->sunPosition_ = position;
     }
-    void GlobalGodrayShader::setSkyColor(const Vector4& color)
+    void GlobalGodrayShader::setSkyColor(const ColourValue& color)
     {
-        this->skyColor[0] = color.x;
-        this->skyColor[1] = color.y;
-        this->skyColor[2] = color.z;
-        this->skyColor[3] = color.w;
+        this->skyColor_ = color;
     }
     const Vector3& GlobalGodrayShader::getSunPosition() const
     {
-        return sunPosition;
+        return this->sunPosition_;
     }
-    const Vector4& GlobalGodrayShader::getSkyColor() const
+    const ColourValue& GlobalGodrayShader::getSkyColor() const
     {
-        Vector4 &color = new Vector4(skyColor[0], skyColor[1], skyColor[2], skyColor[3]);
-        return color;
+        return this->skyColor_;
     }
     
-    void GlobalShader::changedVisibility()
+    void GlobalGodrayShader::changedVisibility()
     {
-        SUPER(GlobalShader, changedVisibility);
+        SUPER(GlobalGodrayShader, changedVisibility);
         
         this->globalShader_.setVisible(this->isVisible());
Index: code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.h
===================================================================
--- code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.h	(revision 8496)
+++ code/branches/environment2/src/orxonox/graphics/GlobalGodrayShader.h	(revision 8497)
@@ -31,5 +31,5 @@
  @file
  
- @brief Header of the GlobalGodrayShader.
+ @brief Header of the GlobalGodrayShader class.
 */
 
@@ -42,4 +42,5 @@
 #include "tools/interfaces/Tickable.h"
 #include "core/BaseObject.h"
+#include "util/Math.h"
 #include "GlobalShader.h"
 
@@ -67,7 +68,7 @@
         
             void setSunPosition(const Vector3& position);
-            void setSkyColor(const Vector4& color);
+            void setSkyColor(const ColourValue& color);
             const Vector3& getSunPosition() const;
-            const Vector4& getSkyColor() const;
+            const ColourValue& getSkyColor() const;
         
         private:
@@ -76,5 +77,5 @@
             
             Vector3 sunPosition_;
-            float skyColor_[4];
+            ColourValue skyColor_;
             float exposure_;
             float decay_;
Index: code/branches/environment2/src/orxonox/graphics/GlobalShader.cc
===================================================================
--- code/branches/environment2/src/orxonox/graphics/GlobalShader.cc	(revision 8496)
+++ code/branches/environment2/src/orxonox/graphics/GlobalShader.cc	(revision 8497)
@@ -38,5 +38,5 @@
     CreateFactory(GlobalShader);
 
-    GlobalShader::GlobalShader(BaseObject* creator) : BaseObject(creator), Synchronisable(creator), 
+    GlobalShader::GlobalShader(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
     {
         RegisterObject(GlobalShader);
