SPM surface BSDF

class surface_spm_t : public wt::bsdf::bsdf_t

Generic smooth to moderately-rough surface with arbitrary (real or complex) IOR and surface profile. The surface might be a transmissive dielectric or a conductor at different parts of the spectrum. Scattering is formalised via 1-st order SPM.

Public Functions

inline surface_spm_t(std::string id, std::shared_ptr<spectrum::spectrum_t> extIOR, std::shared_ptr<spectrum::spectrum_t> IORn, std::shared_ptr<surface_profile::surface_profile_t> profile, std::shared_ptr<spectrum::spectrum_real_t> &&reflection_scale, std::shared_ptr<spectrum::spectrum_real_t> &&transmission_scale)
surface_spm_t(surface_spm_t&&) = default
inline auto IOR(const wavenumber_t k) const noexcept
inline auto reflectivity_scale(const wavenumber_t &k) const noexcept
inline auto transmissivity_scale(const wavenumber_t &k) const noexcept
inline virtual std::optional<f_t> albedo(const wavenumber_t k) const noexcept override

Spectral albedo. Returns std::nullopt when albedo cannot be computed.

Parameters:

k – wavenumber

inline virtual lobe_mask_t lobes(wavenumber_t k) const noexcept override

Returns mask of all available lobes for this BSDF at particular wavenumber.

inline virtual bool is_delta_only(wavenumber_t k) const noexcept override

Does this BSDF comprise of only delta lobes?

inline virtual bool is_delta_lobe(wavenumber_t k, std::uint32_t lobe) const noexcept override

Is a lobe a delta lobe?

virtual bsdf_result_t f(const dir3_t &wi, const dir3_t &wo, const bsdf_query_t &query) const noexcept override

Evaluates the BSDF. Accounts for the cosine foreshortening term.

virtual std::optional<bsdf_sample_t> sample(const dir3_t &wi, const bsdf_query_t &query, sampler::sampler_t &sampler) const noexcept override

Samples the BSDF. The returned weight is bsdf/pdf.

Parameters:

S – normalized Stokes parameters vector that describes the polarimetric properties of incident radiation.

virtual solid_angle_density_t pdf(const dir3_t &wi, const dir3_t &wo, const bsdf_query_t &query) const noexcept override

Provides the sample density.

Parameters:

S – normalized Stokes parameters vector that describes the polarimetric properties of incident radiation.

inline virtual f_t eta(const dir3_t &wi, const dir3_t &wo, const wavenumber_t k) const noexcept override

Computes the refractive-index ratio: eta at exit / eta at entry.

Parameters:

k – wavenumber

virtual scene::element::info_t description() const override

Public Static Functions

static std::unique_ptr<bsdf_t> load(std::string id, scene::loader::loader_t *loader, const scene::loader::node_t &node, const wt::wt_context_t &context)

Public Static Attributes

static constexpr int lobe_specular = 0
static constexpr int lobe_scattered = 1