mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +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
8943c673fb
commit
0801a3cca8
294 changed files with 3894 additions and 2813 deletions
|
|
@ -118,7 +118,7 @@ void ImposterCaptureMaterialHook::init( BaseMatInstance *inMat )
|
|||
mDiffuseMatInst->getFeaturesDelegate().bind( &ImposterCaptureMaterialHook::_overrideFeatures );
|
||||
mDiffuseMatInst->init( features, inMat->getVertexFormat() );
|
||||
|
||||
features.addFeature( MFT_IsDXTnm );
|
||||
features.addFeature( MFT_IsBC3nm );
|
||||
features.addFeature( MFT_NormalMap );
|
||||
features.addFeature( MFT_NormalsOut );
|
||||
features.addFeature( MFT_AccuMap );
|
||||
|
|
@ -176,7 +176,7 @@ ImposterCapture::~ImposterCapture()
|
|||
|
||||
void ImposterCapture::_colorAverageFilter( U32 dimensions, const U8 *inBmpBits, U8 *outBmpBits )
|
||||
{
|
||||
ColorF color;
|
||||
LinearColorF color;
|
||||
U32 count = 0;
|
||||
U32 index, index2;
|
||||
|
||||
|
|
@ -372,10 +372,10 @@ void ImposterCapture::begin( TSShapeInstance *shapeInst,
|
|||
mRadius = radius;
|
||||
mCenter = center;
|
||||
|
||||
mBlackTex.set( mDim, mDim, GFXFormatR8G8B8A8, &GFXDefaultRenderTargetProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) );
|
||||
mWhiteTex.set( mDim, mDim, GFXFormatR8G8B8A8, &GFXDefaultRenderTargetProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) );
|
||||
mNormalTex.set( mDim, mDim, GFXFormatR8G8B8A8, &GFXDefaultRenderTargetProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) );
|
||||
mDepthBuffer.set( mDim, mDim, GFXFormatD24S8, &GFXDefaultZTargetProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) );
|
||||
mBlackTex.set( mDim, mDim, GFXFormatR8G8B8A8_SRGB, &GFXRenderTargetSRGBProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) );
|
||||
mWhiteTex.set( mDim, mDim, GFXFormatR8G8B8A8_SRGB, &GFXRenderTargetSRGBProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) );
|
||||
mNormalTex.set( mDim, mDim, GFXFormatR8G8B8A8, &GFXRenderTargetProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) );
|
||||
mDepthBuffer.set( mDim, mDim, GFXFormatD24S8, &GFXZTargetProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) );
|
||||
|
||||
// copy the black render target data into a bitmap
|
||||
mBlackBmp = new GBitmap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue