diffuse BSDF¶
-
class diffuse_t : public wt::bsdf::bsdf_t
Idealized Lambertian (perfectly-diffusing) interface. Diffuse BSDF admit no transmission: all light is diffusely scattered into the upper hemisphere.
Public Functions
-
diffuse_t(diffuse_t&&) = default
-
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(const 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?
-
inline virtual bool needs_interaction_footprint() const noexcept override
Returns true for BSDF that make use of the surface interaction footprint data.
-
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)
-
diffuse_t(diffuse_t&&) = default