Implementation of sRGB image support. Overhauls the linearization setup to utilize the sRGB image types, as well as refactors the use of ColorF and ColorI to be properly internally consistent. ColorIs are used only for front-facing/editing/UI settings, and ColorFs, now renamed to LinearColorF to reduce confusion of purpose, are used for color info in the engine itself. This avoids confusing and expensive conversions back and forth between types and avoids botches with linearity. Majority work done by @rextimmy

This commit is contained in:
Areloch 2017-06-23 11:36:20 -05:00
parent 8780f83262
commit 25686ed4be
294 changed files with 3894 additions and 2813 deletions

View file

@ -158,7 +158,7 @@ class SceneManager
/// @name Lighting
/// @{
typedef InterpolatedChangeProperty< ColorF > AmbientLightInterpolator;
typedef InterpolatedChangeProperty< LinearColorF > AmbientLightInterpolator;
/// Light manager that is active for the scene.
LightManager* mLightManager;
@ -271,7 +271,7 @@ class SceneManager
bool setLightManager( const char *lmName );
/// Return the current global ambient light color.
const ColorF& getAmbientLightColor() const { return mAmbientLightColor.getCurrentValue(); }
const LinearColorF& getAmbientLightColor() const { return mAmbientLightColor.getCurrentValue(); }
/// Set the time it takes for a new ambient light color to take full effect.
void setAmbientLightTransitionTime( SimTime time ) { mAmbientLightColor.setTransitionTime( time ); }