1#include "SinglePingIsoSurfacesTasks.h"
2#include "dBToLinearTask.h"
3#include "Platform/Instrumentation.h"
5#include "Foundation/Logging/Logger.h"
12using std::numeric_limits;
20 static const float factorA = (float)(log2(10.0) / 10.0);
21 static const float factorAe = (float)(
log(10.0) / 10.0);
22 static const float scale_dB = 100.0f;
24 inline float linearize(
float v)
26 float w = exp2(factorA*(v + scale_dB));
28 w = v < 0.f ? 0.f : numeric_limits<float>::max();
36float EchoSounder::dBToLinear(
float v)
38 return ::linearize(v);
46void EchoSounder::dBToLinearTask::operator()()
48 CpuInstrumentationScope(SCOPE_ECHOSOUNDER,
"Linearize");
50 if (!std::isfinite(overflowThreshold)) overflowThreshold = std::numeric_limits<float>::max();
57 if (overflowThreshold < val) val = 0.f;
58 else val = ::linearize(val);
Log implementation class.
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
constexpr Log getLogger(const char(&name)[LEN]) noexcept
void COGSFOUNDATION_API log(const char *message, const char *source, const Category category, uint32_t errorNumber)
Logs the given message with source and category.