mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-25 01:23:52 +00:00
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:
parent
8780f83262
commit
25686ed4be
294 changed files with 3894 additions and 2813 deletions
|
|
@ -143,7 +143,7 @@ void SceneSimpleZone::setUseAmbientLightColor( bool value )
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void SceneSimpleZone::setAmbientLightColor( const ColorF& color )
|
||||
void SceneSimpleZone::setAmbientLightColor( const LinearColorF& color )
|
||||
{
|
||||
mAmbientLightColor = color;
|
||||
if( isServerObject() )
|
||||
|
|
@ -152,7 +152,7 @@ void SceneSimpleZone::setAmbientLightColor( const ColorF& color )
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool SceneSimpleZone::getZoneAmbientLightColor( U32 zone, ColorF& outColor ) const
|
||||
bool SceneSimpleZone::getZoneAmbientLightColor( U32 zone, LinearColorF& outColor ) const
|
||||
{
|
||||
AssertFatal( zone == getZoneRangeStart(), "SceneSimpleZone::getZoneAmbientLightColor - Invalid zone ID!" );
|
||||
|
||||
|
|
@ -356,6 +356,6 @@ bool SceneSimpleZone::_setUseAmbientLightColor( void* object, const char* index,
|
|||
bool SceneSimpleZone::_setAmbientLightColor( void* object, const char* index, const char* data )
|
||||
{
|
||||
SceneSimpleZone* zone = reinterpret_cast< SceneSimpleZone* >( object );
|
||||
zone->setAmbientLightColor( EngineUnmarshallData< ColorF >()( data ) );
|
||||
zone->setAmbientLightColor( EngineUnmarshallData< LinearColorF >()( data ) );
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue