Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::RoughnessToAlphaMapping Class Referencefinal

Maps roughness value in [0, 1] to the alpha parameter in NDF. More...

#include <RoughnessToAlphaMapping.h>

Static Public Member Functions

static real equaled (const real roughness)
 Directly assign roughness value as-is to alpha.
 
static real squared (const real roughness)
 Mapping for a perceptually linear roughness.
 
static real pbrtV3 (const real roughness)
 This mapping is used in PBRT-v3.
 
static real map (const real roughness, ERoughnessToAlpha mapType)
 Map roughness value to alpha based on map type.
 

Detailed Description

Maps roughness value in [0, 1] to the alpha parameter in NDF.

Maps roughness value in [0, 1] to alpha parameter used by many , microfacet normal distribution functions. Generally, the mapping can be quite beneficial for artists since directly consider roughness as alpha value often does not result in linearly varying specular highlight across equally spaced roughness values. Strangely, the original paper: Microfacet Models for Refraction through Rough Surfaces by Walter et al. does not include such mapping for GGX distribution, only the ones for other kinds of distribution.

Member Function Documentation

◆ equaled()

real ph::RoughnessToAlphaMapping::equaled ( const real roughness)
inlinestatic

Directly assign roughness value as-is to alpha.

◆ map()

real ph::RoughnessToAlphaMapping::map ( const real roughness,
ERoughnessToAlpha mapType )
inlinestatic

Map roughness value to alpha based on map type.

◆ pbrtV3()

real ph::RoughnessToAlphaMapping::pbrtV3 ( const real roughness)
inlinestatic

This mapping is used in PBRT-v3.

◆ squared()

real ph::RoughnessToAlphaMapping::squared ( const real roughness)
inlinestatic

Mapping for a perceptually linear roughness.

According to a course note in SIGGRAPH 2014: Moving Frostbite to Physically Based Rendering 3.0, P.68, hey concluded that a squared mapping gives slightly better distribution of the profiles (blur amount) among all mip levels in the case of pre-integrated diffuse IBL maps.


The documentation for this class was generated from the following file: