Fix issue 181.
This commit is contained in:
parent
aa6cd0d2e5
commit
358bd0296e
@ -40,7 +40,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
ADD_DEFINITIONS(-D_DEBUG)
|
ADD_DEFINITIONS(-D_DEBUG)
|
||||||
ENDIF(CMAKE_BUILD_TYPE STREQUAL "debug")
|
ENDIF(CMAKE_BUILD_TYPE STREQUAL "debug")
|
||||||
|
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_RELEASE} -fPIC")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
|
@ -74,6 +74,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "Half.h"
|
#include "Half.h"
|
||||||
|
|
||||||
|
#include "nvcore/Memory.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if NV_CC_GNUC
|
#if NV_CC_GNUC
|
||||||
@ -494,7 +497,7 @@ nv::half_to_float( uint16 h )
|
|||||||
|
|
||||||
static __m128 half_to_float4_SSE2(__m128i h)
|
static __m128 half_to_float4_SSE2(__m128i h)
|
||||||
{
|
{
|
||||||
#define SSE_CONST4(name, val) static const __declspec(align(16)) uint name[4] = { (val), (val), (val), (val) }
|
#define SSE_CONST4(name, val) static const NV_ALIGN_16 uint name[4] = { (val), (val), (val), (val) }
|
||||||
#define CONST(name) *(const __m128i *)&name
|
#define CONST(name) *(const __m128i *)&name
|
||||||
|
|
||||||
SSE_CONST4(mask_nosign, 0x7fff);
|
SSE_CONST4(mask_nosign, 0x7fff);
|
||||||
|
@ -224,7 +224,7 @@ Surface process(const Surface & src, int method) {
|
|||||||
dst = src;
|
dst = src;
|
||||||
|
|
||||||
// @@ Experiment with log/exp transform!
|
// @@ Experiment with log/exp transform!
|
||||||
float gamma = 2.2;
|
float gamma = 2.2f;
|
||||||
|
|
||||||
dst.scaleBias(0, 1.0f / rMax, 0);
|
dst.scaleBias(0, 1.0f / rMax, 0);
|
||||||
dst.scaleBias(1, 1.0f / gMax, 0);
|
dst.scaleBias(1, 1.0f / gMax, 0);
|
||||||
@ -323,7 +323,7 @@ int main(int argc, char *argv[])
|
|||||||
Array<float> exposures;
|
Array<float> exposures;
|
||||||
for (int i = 0; i < 48; i++) {
|
for (int i = 0; i < 48; i++) {
|
||||||
//exposures.append(8 * float(i)/63);
|
//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");
|
Surface src = loadInput("hdr/34017_03.dds");
|
||||||
@ -345,7 +345,7 @@ int main(int argc, char *argv[])
|
|||||||
compare(src, process(src, 3), exposures, errors);
|
compare(src, process(src, 3), exposures, errors);
|
||||||
updatePointSet(exposures, errors, chart.pointSetArray[1]);
|
updatePointSet(exposures, errors, chart.pointSetArray[1]);
|
||||||
chart.pointSetArray[1].legend = "Log + Gamma 2.2";
|
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();
|
chart.autoScale();
|
||||||
|
@ -114,7 +114,7 @@ int main(int argc, char *argv[])
|
|||||||
const float gamma = 2.2f;
|
const float gamma = 2.2f;
|
||||||
colorMap.toLinear(gamma);
|
colorMap.toLinear(gamma);
|
||||||
|
|
||||||
const float alphaRef = 0.95;
|
const float alphaRef = 0.95f;
|
||||||
const float coverage = colorMap.alphaTestCoverage(alphaRef);
|
const float coverage = colorMap.alphaTestCoverage(alphaRef);
|
||||||
|
|
||||||
// Build and output mipmaps.
|
// Build and output mipmaps.
|
||||||
|
@ -59,13 +59,13 @@ int main(int argc, char *argv[])
|
|||||||
assembleVolume = false;
|
assembleVolume = false;
|
||||||
assembleTextureArray = false;
|
assembleTextureArray = false;
|
||||||
}
|
}
|
||||||
/*if (strcmp("-volume", argv[i]) == 0)
|
if (strcmp("-volume", argv[i]) == 0)
|
||||||
{
|
{
|
||||||
assembleCubeMap = false;
|
assembleCubeMap = false;
|
||||||
assembleVolume = true;
|
assembleVolume = true;
|
||||||
assembleTextureArray = false;
|
assembleTextureArray = false;
|
||||||
}
|
}
|
||||||
if (strcmp("-array", argv[i]) == 0)
|
/*if (strcmp("-array", argv[i]) == 0)
|
||||||
{
|
{
|
||||||
assembleCubeMap = false;
|
assembleCubeMap = false;
|
||||||
assembleVolume = false;
|
assembleVolume = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user