Commit 20fa73ce authored by reichenbach's avatar reichenbach

[MERGE]

parents 372156e1 94e1ee84
......@@ -89,6 +89,9 @@ void WCreateColorArraysThread::threadMain()
b *= -1.0;
float norm = std::sqrt( r * r + g * g + b * b );
if( norm == 0.0 )
norm = 1.0;
r *= 1.0 / norm;
g *= 1.0 / norm;
b *= 1.0 / norm;
......@@ -107,6 +110,9 @@ void WCreateColorArraysThread::threadMain()
lastz = (*m_vertices)[pc + 2];
float norm = std::sqrt( rr * rr + gg * gg + bb * bb );
if( norm == 0.0 )
norm = 1.0;
rr *= 1.0 / norm;
gg *= 1.0 / norm;
bb *= 1.0 / norm;
......@@ -139,3 +145,4 @@ bool WCreateColorArraysThread::isFinished()
{
return m_myThreadFinished;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment