]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/light.h
Modify sunlight color based on transmittance of the atmosphere
[libs/gl.git] / source / materials / light.h
index d097d04ae435157ebb1c4ddd18cc2bd5857d37d0..d4b66077928188076b44974d6eaf6c36d4e2ccc2 100644 (file)
@@ -44,6 +44,7 @@ public:
 
 private:
        Color color;
+       Color transmittance;
        Vector4 position;
        Vector3 spot_dir;
        Vector3 direction;
@@ -62,7 +63,12 @@ public:
        to shaders as light_sources[i].color. */
        void set_color(const Color &);
 
+       /** Sets a multiplier on how much light actually reaches the target.  Used
+       when modeling an atmosphere. */
+       void set_transmittance(const Color &);
+
        const Color &get_color() const { return color; }
+       const Color &get_transmittance() const { return transmittance; }
 
        DEPRECATED void set_diffuse(const Color &c) { set_color(c); }
        DEPRECATED void set_specular(const Color &) { }