X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Flighting.h;fp=source%2Flighting.h;h=931d06d3daf8d2e72aede2af04452b0d0a2e740a;hp=8b3feb5f343af74622aa26b8b9689697a8da09a3;hb=bbd21944fae06f134625b2f5595c3aab36c3aa9e;hpb=574abfb7aeb77436714ea06bf82713cb3d85204e diff --git a/source/lighting.h b/source/lighting.h index 8b3feb5f..931d06d3 100644 --- a/source/lighting.h +++ b/source/lighting.h @@ -24,6 +24,8 @@ private: Color sky_color; Vector3 sky_direction; Geometry::Angle horizon_angle; + Color fog_color; + float fog_density; std::vector lights; public: @@ -45,6 +47,16 @@ public: Has no effect without shaders. */ void set_horizon_angle(const Geometry::Angle &); + /** Sets the fog color, which is blended into distant surfaces. */ + void set_fog_color(const Color &); + + /** Sets the density of the fog. Zero means no fog. */ + void set_fog_density(float); + + /** Sets the density of the fog so that the blending factor at the given + distance is 50%. */ + void set_fog_half_distance(float); + /** Attaches a light source. If the attachment index is greater than LightUnit::get_n_units, the Lighting can't be bound for legacy mode. */ void attach(unsigned, const Light &);