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

@ -115,11 +115,11 @@ protected:
Type mType;
/// The primary light color.
ColorF mColor;
LinearColorF mColor;
F32 mBrightness;
ColorF mAmbient;
LinearColorF mAmbient;
MatrixF mTransform;
@ -172,14 +172,14 @@ public:
VectorF getDirection() const { return mTransform.getForwardVector(); }
void setDirection( const VectorF &val );
const ColorF& getColor() const { return mColor; }
void setColor( const ColorF &val ) { mColor = val; }
const LinearColorF& getColor() const { return mColor; }
void setColor( const LinearColorF &val ) { mColor = val; }
F32 getBrightness() const { return mBrightness; }
void setBrightness( F32 val ) { mBrightness = val; }
const ColorF& getAmbient() const { return mAmbient; }
void setAmbient( const ColorF &val ) { mAmbient = val; }
const LinearColorF& getAmbient() const { return mAmbient; }
void setAmbient( const LinearColorF &val ) { mAmbient = val; }
const Point3F& getRange() const { return mRange; }
void setRange( const Point3F &range ) { mRange = range; }