Commit a778af8b authored by Larsen, Matthew's avatar Larsen, Matthew
Browse files

make scalar normilization consistent across rendering

parent 168952a0
......@@ -185,8 +185,7 @@ public:
if (fieldLength == 0.f)
{
// constant color
FieldMin = 0.f;
InverseFieldDelta = 1.f;
InverseFieldDelta = 0.f;
}
else
{
......
......@@ -383,17 +383,13 @@ public:
{
// support the scalar renderer
Normalize = false;
MinScalar = 0;
invDeltaScalar = 1;
invDeltaScalar = Precision(0.f);
}
else
{
//Make sure the we don't divide by zero on
//something like an iso-surface
if (maxScalar - MinScalar != 0.f)
invDeltaScalar = 1.f / (maxScalar - MinScalar);
else
invDeltaScalar = 1.f / minScalar;
invDeltaScalar = 1.f / (maxScalar - MinScalar);
}
}
typedef void ControlSignature(FieldIn, FieldInOut, WholeArrayIn, WholeArrayIn);
......
......@@ -370,17 +370,13 @@ public:
{
// support the scalar renderer
Normalize = false;
MinScalar = 0;
invDeltaScalar = 1;
invDeltaScalar = Precision(0.f);
}
else
{
//Make sure the we don't divide by zero on
//something like an iso-surface
if (maxScalar - MinScalar != 0.f)
invDeltaScalar = 1.f / (maxScalar - MinScalar);
else
invDeltaScalar = 1.f / minScalar;
invDeltaScalar = 1.f / (maxScalar - MinScalar);
}
}
typedef void ControlSignature(FieldIn, FieldOut, WholeArrayIn, WholeArrayIn);
......
......@@ -261,17 +261,13 @@ public:
{
// support the scalar renderer
Normalize = false;
MinScalar = 0;
invDeltaScalar = 1;
invDeltaScalar = Precision(0.f);
}
else
{
//Make sure the we don't divide by zero on
//something like an iso-surface
if (maxScalar - MinScalar != 0.f)
invDeltaScalar = 1.f / (maxScalar - MinScalar);
else
invDeltaScalar = 1.f / minScalar;
invDeltaScalar = 1.f / (maxScalar - MinScalar);
}
}
typedef void ControlSignature(FieldIn, FieldOut, WholeArrayIn, WholeArrayIn);
......
......@@ -319,17 +319,13 @@ public:
{
// support the scalar renderer
Normalize = false;
MinScalar = 0;
invDeltaScalar = 1;
invDeltaScalar = Precision(0.f);
}
else
{
//Make sure the we don't divide by zero on
//something like an iso-surface
if (maxScalar - MinScalar != 0.f)
invDeltaScalar = 1.f / (maxScalar - MinScalar);
else
invDeltaScalar = 1.f / minScalar;
invDeltaScalar = 1.f / (maxScalar - MinScalar);
}
}
......
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