Fix issue 181.

This commit is contained in:
castano
2013-02-01 23:19:58 +00:00
parent aa6cd0d2e5
commit 358bd0296e
5 changed files with 11 additions and 8 deletions

View File

@ -224,7 +224,7 @@ Surface process(const Surface & src, int method) {
dst = src;
// @@ Experiment with log/exp transform!
float gamma = 2.2;
float gamma = 2.2f;
dst.scaleBias(0, 1.0f / rMax, 0);
dst.scaleBias(1, 1.0f / gMax, 0);
@ -323,7 +323,7 @@ int main(int argc, char *argv[])
Array<float> exposures;
for (int i = 0; i < 48; i++) {
//exposures.append(8 * float(i)/63);
exposures.append(lerp(0.22, 22, float(i)/47));
exposures.append(lerp(0.22f, 22, float(i)/47));
}
Surface src = loadInput("hdr/34017_03.dds");
@ -345,7 +345,7 @@ int main(int argc, char *argv[])
compare(src, process(src, 3), exposures, errors);
updatePointSet(exposures, errors, chart.pointSetArray[1]);
chart.pointSetArray[1].legend = "Log + Gamma 2.2";
chart.pointSetArray[1].lineColor = Vector3(0.19, 0.45, 0.95);
chart.pointSetArray[1].lineColor = Vector3(0.19f, 0.45f, 0.95f);
chart.autoScale();

View File

@ -114,7 +114,7 @@ int main(int argc, char *argv[])
const float gamma = 2.2f;
colorMap.toLinear(gamma);
const float alphaRef = 0.95;
const float alphaRef = 0.95f;
const float coverage = colorMap.alphaTestCoverage(alphaRef);
// Build and output mipmaps.

View File

@ -59,13 +59,13 @@ int main(int argc, char *argv[])
assembleVolume = false;
assembleTextureArray = false;
}
/*if (strcmp("-volume", argv[i]) == 0)
if (strcmp("-volume", argv[i]) == 0)
{
assembleCubeMap = false;
assembleVolume = true;
assembleTextureArray = false;
}
if (strcmp("-array", argv[i]) == 0)
/*if (strcmp("-array", argv[i]) == 0)
{
assembleCubeMap = false;
assembleVolume = false;