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

@ -61,7 +61,7 @@ class SceneSimpleZone : public SceneZoneSpace
bool mUseAmbientLightColor;
/// Ambient light color in this zone.
ColorF mAmbientLightColor;
LinearColorF mAmbientLightColor;
/// @}
@ -102,12 +102,12 @@ class SceneSimpleZone : public SceneZoneSpace
void setUseAmbientLightColor( bool value );
/// Return the ambient light color for this zone.
ColorF getAmbientLightColor() const { return mAmbientLightColor; }
LinearColorF getAmbientLightColor() const { return mAmbientLightColor; }
/// Set the ambient light color for the zone.
/// @note This only takes effect if useAmbientLightColor() return true.
/// @see setUseAmbientLightColor
void setAmbientLightColor( const ColorF& color );
void setAmbientLightColor( const LinearColorF& color );
/// @}
@ -131,7 +131,7 @@ class SceneSimpleZone : public SceneZoneSpace
virtual U32 getPointZone( const Point3F &p );
virtual bool getOverlappingZones( const Box3F& aabb, U32* outZones, U32& outNumZones );
virtual void traverseZones( SceneTraversalState* state );
virtual bool getZoneAmbientLightColor( U32 zone, ColorF& outColor ) const;
virtual bool getZoneAmbientLightColor( U32 zone, LinearColorF& outColor ) const;
virtual void traverseZones( SceneTraversalState* state, U32 startZoneId );
/// @}