5#include <Common/primitive_type.h>
28 static real
equaled(
const real roughness);
37 static real
squared(
const real roughness);
41 static real
pbrtV3(
const real roughness);
57 return roughness * roughness;
62 const real clampedRoughness = std::max(roughness, 0.001_r);
63 const real x = std::log(clampedRoughness);
65 return 1.621420000_r +
67 0.173400000_r * x * x +
68 0.017120100_r * x * x * x +
69 0.000640711_r * x * x * x * x;
Maps roughness value in [0, 1] to the alpha parameter in NDF.
Definition RoughnessToAlphaMapping.h:24
static real equaled(const real roughness)
Directly assign roughness value as-is to alpha.
Definition RoughnessToAlphaMapping.h:50
static real squared(const real roughness)
Mapping for a perceptually linear roughness.
Definition RoughnessToAlphaMapping.h:55
static real pbrtV3(const real roughness)
This mapping is used in PBRT-v3.
Definition RoughnessToAlphaMapping.h:60
static real map(const real roughness, ERoughnessToAlpha mapType)
Map roughness value to alpha based on map type.
Definition RoughnessToAlphaMapping.h:72
The root for all renderer implementations.
Definition EEngineProject.h:6
ERoughnessToAlpha
Definition sdl_component_enums.h:26