Undo changes.

This commit is contained in:
castano 2010-11-11 19:53:45 +00:00
parent d6f6c1f1d4
commit 4cbf43165c
2 changed files with 11 additions and 24 deletions

View File

@ -129,7 +129,7 @@ float WeightedClusterFit::GetBestError() const
#if SQUISH_USE_SIMD #if SQUISH_USE_SIMD
bool WeightedClusterFit::Compress3( Vec3 * start, Vec3 * end ) void WeightedClusterFit::Compress3( void* block )
{ {
int const count = m_colours->GetCount(); int const count = m_colours->GetCount();
Vec4 const one = VEC4_CONST(1.0f); Vec4 const one = VEC4_CONST(1.0f);
@ -212,7 +212,7 @@ bool WeightedClusterFit::Compress3( Vec3 * start, Vec3 * end )
if( CompareAnyLessThan( besterror, m_besterror ) ) if( CompareAnyLessThan( besterror, m_besterror ) )
{ {
// compute indices from cluster sizes. // compute indices from cluster sizes.
/*u8 bestindices[16]; u8 bestindices[16];
{ {
int i = 0; int i = 0;
for(; i < b0; i++) { for(; i < b0; i++) {
@ -233,22 +233,16 @@ bool WeightedClusterFit::Compress3( Vec3 * start, Vec3 * end )
m_colours->RemapIndices( ordered, bestindices ); m_colours->RemapIndices( ordered, bestindices );
// save the block // save the block
WriteColourBlock3( beststart.GetVec3(), bestend.GetVec3(), bestindices, block );*/ WriteColourBlock3( beststart.GetVec3(), bestend.GetVec3(), bestindices, block );
*start = beststart.GetVec3();
*end = bestend.GetVec3();
// save the error // save the error
m_besterror = besterror; m_besterror = besterror;
return true;
} }
return false;
} }
bool WeightedClusterFit::Compress4( Vec3 * start, Vec3 * end ) void WeightedClusterFit::Compress4( void* block )
{ {
int const count = m_colours->GetCount(); int const count = m_colours->GetCount();
Vec4 const one = VEC4_CONST(1.0f); Vec4 const one = VEC4_CONST(1.0f);
@ -340,7 +334,7 @@ bool WeightedClusterFit::Compress4( Vec3 * start, Vec3 * end )
// save the block if necessary // save the block if necessary
if( CompareAnyLessThan( besterror, m_besterror ) ) if( CompareAnyLessThan( besterror, m_besterror ) )
{ {
/*// compute indices from cluster sizes. // compute indices from cluster sizes.
u8 bestindices[16]; u8 bestindices[16];
{ {
int i = 0; int i = 0;
@ -366,18 +360,11 @@ bool WeightedClusterFit::Compress4( Vec3 * start, Vec3 * end )
m_colours->RemapIndices( ordered, bestindices ); m_colours->RemapIndices( ordered, bestindices );
// save the block // save the block
WriteColourBlock4( beststart.GetVec3(), bestend.GetVec3(), bestindices, block );*/ WriteColourBlock4( beststart.GetVec3(), bestend.GetVec3(), bestindices, block );
*start = beststart.GetVec3();
*end = bestend.GetVec3();
// save the error // save the error
m_besterror = besterror; m_besterror = besterror;
return true;
} }
return false;
} }
#else #else

View File

@ -23,7 +23,7 @@
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#ifndef NV_SQUISH_WEIGHTEDCLUSTERFIT_H #ifndef NV_SQUISH_WEIGHTEDCLUSTERFIT_H
#define NV_SQUISH_WEIGHTEDCLUSTERFIT_H #define NV_SQUISH_WEIGHTEDCLUSTERFIT_H
@ -45,8 +45,8 @@ public:
float GetBestError() const; float GetBestError() const;
// Make them public // Make them public
bool Compress3( Vec3 * start, Vec3 * end ); virtual void Compress3( void* block );
bool Compress4( Vec3 * start, Vec3 * end ); virtual void Compress4( void* block );
private: private: