mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-04 20:15:16 +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
|
|
@ -176,7 +176,6 @@ ImplementEnumType(baseTexFormat,
|
|||
{ TerrainBlock::NONE, "NONE", "No cached terrain.\n" },
|
||||
{ TerrainBlock::DDS, "DDS", "Cache the terrain in a DDS format.\n" },
|
||||
{ TerrainBlock::PNG, "PNG", "Cache the terrain in a PNG format.\n" },
|
||||
{ TerrainBlock::JPG, "JPG", "Cache the terrain in a JPG format.\n" },
|
||||
EndImplementEnumType;
|
||||
|
||||
TerrainBlock::TerrainBlock()
|
||||
|
|
@ -189,7 +188,7 @@ TerrainBlock::TerrainBlock()
|
|||
mDetailsDirty( false ),
|
||||
mLayerTexDirty( false ),
|
||||
mBaseTexSize( 1024 ),
|
||||
mBaseTexFormat( TerrainBlock::JPG ),
|
||||
mBaseTexFormat( TerrainBlock::DDS ),
|
||||
mCell( NULL ),
|
||||
mBaseMaterial( NULL ),
|
||||
mDefaultMatInst( NULL ),
|
||||
|
|
@ -873,7 +872,7 @@ GFXTextureObject* TerrainBlock::getLightMapTex()
|
|||
if ( mLightMapTex.isNull() && mLightMap )
|
||||
{
|
||||
mLightMapTex.set( mLightMap,
|
||||
&GFXDefaultStaticDiffuseProfile,
|
||||
&GFXStaticTextureProfile,
|
||||
false,
|
||||
"TerrainBlock::getLightMapTex()" );
|
||||
}
|
||||
|
|
@ -966,7 +965,7 @@ bool TerrainBlock::onAdd()
|
|||
_updateBaseTexture( true );
|
||||
|
||||
// The base texture should have been cached by now... so load it.
|
||||
mBaseTex.set( baseCachePath, &GFXDefaultStaticDiffuseProfile, "TerrainBlock::mBaseTex" );
|
||||
mBaseTex.set( baseCachePath, &GFXStaticTextureSRGBProfile, "TerrainBlock::mBaseTex" );
|
||||
|
||||
GFXTextureManager::addEventDelegate( this, &TerrainBlock::_onTextureEvent );
|
||||
MATMGR->getFlushSignal().notify( this, &TerrainBlock::_onFlushMaterials );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue