Undo changes.

pull/216/head
castano 14 years ago
parent d6f6c1f1d4
commit 4cbf43165c

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

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

Loading…
Cancel
Save