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 8943c673fb
commit 0801a3cca8
294 changed files with 3894 additions and 2813 deletions

View file

@ -590,7 +590,7 @@ void GuiObjectView::setCameraRotation( const EulerF& rotation )
}
//------------------------------------------------------------------------------
void GuiObjectView::setLightColor( const ColorF& color )
void GuiObjectView::setLightColor( const LinearColorF& color )
{
mLightColor = color;
if( mLight )
@ -599,7 +599,7 @@ void GuiObjectView::setLightColor( const ColorF& color )
//------------------------------------------------------------------------------
void GuiObjectView::setLightAmbient( const ColorF& color )
void GuiObjectView::setLightAmbient( const LinearColorF& color )
{
mLightAmbient = color;
if( mLight )
@ -952,7 +952,7 @@ DefineEngineMethod( GuiObjectView, setCameraSpeed, void, (F32 factor),,
//-----------------------------------------------------------------------------
DefineEngineMethod( GuiObjectView, setLightColor, void, ( ColorF color),,
DefineEngineMethod( GuiObjectView, setLightColor, void, ( LinearColorF color),,
"@brief Set the light color on the sun object used to render the model.\n\n"
"@param color Color of sunlight.\n"
"@tsexample\n"
@ -968,7 +968,7 @@ DefineEngineMethod( GuiObjectView, setLightColor, void, ( ColorF color),,
//-----------------------------------------------------------------------------
DefineEngineMethod( GuiObjectView, setLightAmbient, void, (ColorF color),,
DefineEngineMethod( GuiObjectView, setLightAmbient, void, (LinearColorF color),,
"@brief Set the light ambient color on the sun object used to render the model.\n\n"
"@param color Ambient color of sunlight.\n"
"@tsexample\n"