Class mask_t¶
Defined in File mask.hpp
Inheritance Relationships¶
Base Type¶
public wt::bsdf::bsdf_t
(Class bsdf_t)
Class Documentation¶
-
class mask_t : public wt::bsdf::bsdf_t¶
Masks the nested BSDF using the opacity of the supplied texture. Masked samples are null delta lobes (perfect forward “transmission”). Transmissive nested BSDFs are NOT supported.
Public Functions
-
inline virtual frame_t shading_frame(const texture::texture_query_t &tquery, const mesh::surface_differentials_t &tangent_frame, const dir3_t &ns) const noexcept override¶
Constructs a shading frame in world space. This is useful for BSDFs that perturb the shading frame, like normal or bump maps.
- Parameters:
tquery – texture query data.
tangent_frame – mesh tangent frame at intersection.
ns – interpolated shading normal at intersection.
-
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
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)¶
-
inline virtual frame_t shading_frame(const texture::texture_query_t &tquery, const mesh::surface_differentials_t &tangent_frame, const dir3_t &ns) const noexcept override¶