This commit is contained in:
Hans-Kristian Arntzen 2023-02-22 14:53:06 -05:00 committed by GitHub
commit 21224433e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@
#include "shaders/ffx_fsr1.h"
#include "shaders/ffx_spd.h"
#include "shaders/ffx_fsr2_callbacks_hlsl.h"
#include <cmath>
#include "ffx_fsr2_maximum_bias.h"
@ -182,7 +183,7 @@ FfxConstantBuffer globalFsr2ConstantBuffers[4] = {
// Lanczos
static float lanczos2(float value)
{
return abs(value) < FFX_EPSILON ? 1.f : (sinf(FFX_PI * value) / (FFX_PI * value)) * (sinf(0.5f * FFX_PI * value) / (0.5f * FFX_PI * value));
return std::abs(value) < FFX_EPSILON ? 1.f : (sinf(FFX_PI * value) / (FFX_PI * value)) * (sinf(0.5f * FFX_PI * value) / (0.5f * FFX_PI * value));
}
// Calculate halton number for index and base.