mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-09 07:20:40 +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
|
|
@ -113,7 +113,7 @@ protected:
|
|||
U32 type;
|
||||
F32 windAmplitude;
|
||||
Box3F worldBox;
|
||||
ColorF lmColor;
|
||||
LinearColorF lmColor;
|
||||
};
|
||||
|
||||
/// This is the x,y index for this cell.
|
||||
|
|
@ -239,7 +239,7 @@ void GroundCoverCell::_rebuildVB()
|
|||
const S32 &type = (*iter).type;
|
||||
const Point3F &size = (*iter).size;
|
||||
const F32 &windAmplitude = (*iter).windAmplitude;
|
||||
GFXVertexColor color = (ColorI)(*iter).lmColor;
|
||||
color = LinearColorF((*iter).lmColor).toColorI();
|
||||
U8 *col = (U8 *)const_cast<U32 *>( (const U32 *)color );
|
||||
|
||||
vertPtr->point = position;
|
||||
|
|
@ -944,7 +944,7 @@ void GroundCover::_initialize( U32 cellCount, U32 cellPlacementCount )
|
|||
Material* mat = dynamic_cast<Material*>(mMatInst->getMaterial());
|
||||
if(mat)
|
||||
{
|
||||
GFXTexHandle tex(mat->mDiffuseMapFilename[0], &GFXDefaultStaticDiffuseProfile, "GroundCover texture aspect ratio check" );
|
||||
GFXTexHandle tex(mat->mDiffuseMapFilename[0], &GFXStaticTextureSRGBProfile, "GroundCover texture aspect ratio check" );
|
||||
if(tex.isValid())
|
||||
{
|
||||
U32 w = tex.getWidth();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue