Class fractal_t¶
Defined in File fractal.hpp
Nested Relationships¶
Nested Types¶
Inheritance Relationships¶
Base Type¶
public wt::surface_profile::surface_profile_t
(Class surface_profile_t)
Class Documentation¶
-
class fractal_t : public wt::surface_profile::surface_profile_t¶
Surface with fractal statistics (aka K-Correlation model). Implements sampling and evaluation.
Surface statistics are parametrized by either of:
Perceptual roughness and \( \gamma \) (log-log space slope of the fractal profile); in the optical regime the perceptual roughness is parameterized such that it produces a lobe shape similar to a classical microfacet surface with a GGX NDF (and matches GGX when \( \gamma=3 \)).
Or, by surface correlation length squared (T), RMS surface roughness ( \( \sigma_h \)) and \( \gamma \).
Public Functions
-
inline fractal_t(std::string id, f_t gamma, std::unique_ptr<texture::quantity_t<fractalT_t>> &&T_tex, std::unique_ptr<texture::quantity_t<rms_t>> &&sigmah_tex) noexcept¶
-
inline virtual variance_t variance(const texture_query_t &query) const noexcept override¶
Variance of the surface profile.
-
inline virtual rms_t rms_roughness(const texture_query_t &query) const noexcept override¶
RMS roughness of the surface profile.
-
inline virtual f_t alpha(const dir3_t &wi, const dir3_t &wo, const texture_query_t &query) const noexcept override¶
Fraction of scatter contained in specular term.
- Parameters:
k – wavenumber
-
inline virtual f_t alpha(const dir3_t &wi, const texture_query_t &query) const noexcept override¶
Fraction of scatter contained in specular term.
- Parameters:
k – wavenumber
-
inline virtual bool is_delta_only(wavenumber_t k) const noexcept override¶
-
inline virtual bool needs_interaction_footprint() const noexcept override¶
Returns true for profiles that make use of the surface interaction footprint data.
-
inline virtual f_t psd(const dir3_t &wi, const dir3_t &wo, const texture_query_t &query) const noexcept override¶
Evaluates the fractal lobe power spectral density (PSD).
-
virtual surface_profile_sample_ret_t sample(const dir3_t &wi, const texture_query_t &query, sampler::sampler_t &sampler) const noexcept override¶
Samples a scattered direction.
Public Static Functions
-
static std::unique_ptr<surface_profile_t> load(std::string id, scene::loader::loader_t *loader, const scene::loader::node_t &node, const wt::wt_context_t &context)¶