private:
Color color;
+ Color transmittance;
Vector4 position;
Vector3 spot_dir;
Vector3 direction;
float spot_exp;
Geometry::Angle<float> spot_cutoff;
float attenuation[3];
+ unsigned generation;
public:
Light();
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 &) { }
void set_attenuation(float, float, float);
const float *get_attenuation() const { return attenuation; }
- /** Updates a ProgramData object with the uniforms for the Light. A view
- matrix and light source index must be passed in. */
- void update_shader_data(ProgramData &, const Matrix &, unsigned) const;
+ unsigned get_generation() const { return generation; }
+
+ /** Updates a ProgramData object with the uniforms for the Light. A light
+ source index must be passed in. Primarily used by Lighting. */
+ void update_shader_data(ProgramData &, unsigned) const;
};
} // namespace GL