Fix minor warnings.
Add output directories to ignore list.
This commit is contained in:
@ -39,7 +39,7 @@ using namespace nvtt;
|
||||
// Solid angle of an axis aligned quad from (0,0,1) to (x,y,1)
|
||||
// See: http://www.fizzmoll11.com/thesis/ for a derivation of this formula.
|
||||
static float areaElement(float x, float y) {
|
||||
return atan2(x*y, sqrtf(x*x + y*y + 1));
|
||||
return atan2f(x*y, sqrtf(x*x + y*y + 1));
|
||||
}
|
||||
|
||||
// Solid angle of a hemicube texel.
|
||||
@ -206,19 +206,19 @@ static const Vector3 faceV[6] = {
|
||||
|
||||
static Vector2 toPolar(Vector3::Arg v) {
|
||||
Vector2 p;
|
||||
p.x = atan2(v.x, v.y); // theta
|
||||
p.x = atan2f(v.x, v.y); // theta
|
||||
p.y = acosf(v.z); // phi
|
||||
return p;
|
||||
}
|
||||
|
||||
static Vector2 toPlane(float theta, float phi) {
|
||||
float x = sin(phi) * cos(theta);
|
||||
float y = sin(phi) * sin(theta);
|
||||
float z = cos(phi);
|
||||
float x = sinf(phi) * cosf(theta);
|
||||
float y = sinf(phi) * sinf(theta);
|
||||
float z = cosf(phi);
|
||||
|
||||
Vector2 p;
|
||||
p.x = x / fabs(z);
|
||||
p.y = y / fabs(z);
|
||||
p.x = x / fabsf(z);
|
||||
p.y = y / fabsf(z);
|
||||
//p.x = tan(phi) * cos(theta);
|
||||
//p.y = tan(phi) * sin(theta);
|
||||
|
||||
@ -227,8 +227,8 @@ static Vector2 toPlane(float theta, float phi) {
|
||||
|
||||
static Vector2 toPlane(Vector3::Arg v) {
|
||||
Vector2 p;
|
||||
p.x = v.x / fabs(v.z);
|
||||
p.y = v.y / fabs(v.z);
|
||||
p.x = v.x / fabsf(v.z);
|
||||
p.y = v.y / fabsf(v.z);
|
||||
return p;
|
||||
}
|
||||
|
||||
@ -569,7 +569,7 @@ CubeSurface CubeSurface::irradianceFilter(int size, EdgeFixup fixupMethod) const
|
||||
// Convolve filter against this cube.
|
||||
Vector3 CubeSurface::Private::applyAngularFilter(const Vector3 & filterDir, float coneAngle, float * filterTable, int tableSize)
|
||||
{
|
||||
const float cosineConeAngle = cos(coneAngle);
|
||||
const float cosineConeAngle = cosf(coneAngle);
|
||||
nvDebugCheck(cosineConeAngle >= 0);
|
||||
|
||||
Vector3 color(0);
|
||||
@ -690,7 +690,7 @@ Vector3 CubeSurface::Private::applyAngularFilter(const Vector3 & filterDir, floa
|
||||
// Convolve filter against this cube.
|
||||
Vector3 CubeSurface::Private::applyCosinePowerFilter(const Vector3 & filterDir, float coneAngle, float cosinePower)
|
||||
{
|
||||
const float cosineConeAngle = cos(coneAngle);
|
||||
const float cosineConeAngle = cosf(coneAngle);
|
||||
nvDebugCheck(cosineConeAngle >= 0);
|
||||
|
||||
Vector3 color(0);
|
||||
|
@ -1993,7 +1993,7 @@ static Color32 toRgbe8(float r, float g, float b)
|
||||
}
|
||||
else {
|
||||
int e;
|
||||
v = frexp(v, &e) * 256.0f / v;
|
||||
v = frexpf(v, &e) * 256.0f / v;
|
||||
c.r = uint8(clamp(r * v, 0.0f, 255.0f));
|
||||
c.g = uint8(clamp(g * v, 0.0f, 255.0f));
|
||||
c.b = uint8(clamp(b * v, 0.0f, 255.0f));
|
||||
@ -2845,13 +2845,13 @@ void Surface::transformNormals(NormalTransform xform)
|
||||
float discriminant = b * b - 4.0f * a * c;
|
||||
float t = (-b + sqrtf(discriminant)) / (2.0f * a);
|
||||
|
||||
float d = fabs(n.z * t - (1 - n.x*n.x*t*t) * (1 - n.y*n.y*t*t));
|
||||
float d = fabsf(n.z * t - (1 - n.x*n.x*t*t) * (1 - n.y*n.y*t*t));
|
||||
|
||||
while (d > 0.0001) {
|
||||
float ft = 1 - n.z * t - (n.x*n.x + n.y*n.y)*t*t + n.x*n.x*n.y*n.y*t*t*t*t;
|
||||
float fit = - n.z - 2*(n.x*n.x + n.y*n.y)*t + 4*n.x*n.x*n.y*n.y*t*t*t;
|
||||
t -= ft / fit;
|
||||
d = fabs(n.z * t - (1 - n.x*n.x*t*t) * (1 - n.y*n.y*t*t));
|
||||
d = fabsf(n.z * t - (1 - n.x*n.x*t*t) * (1 - n.y*n.y*t*t));
|
||||
};
|
||||
|
||||
n.x = n.x * t;
|
||||
|
Reference in New Issue
Block a user