PlasticBsdf::PlasticBsdf() : _ior(1.5f), _thickness(1.0f), _sigmaA(0.0f) { _lobes = BsdfLobes(BsdfLobes::SpecularReflectionLobe | BsdfLobes::DiffuseReflectionLobe); }
void PhongBsdf::prepareForRender() { _lobes = BsdfLobes(BsdfLobes::GlossyReflectionLobe | BsdfLobes::DiffuseReflectionLobe); _invExponent = 1.0f/(1.0f + _exponent); _pdfFactor = (_exponent + 1.0f)*INV_TWO_PI; _brdfFactor = (_exponent + 2.0f)*INV_TWO_PI; }
void RoughCoatBsdf::prepareForRender() { _scaledSigmaA = _thickness*_sigmaA; _avgTransmittance = std::exp(-2.0f*_scaledSigmaA.avg()); _distribution = Microfacet::stringToType(_distributionName); _lobes = BsdfLobes(BsdfLobes::GlossyReflectionLobe, _substrate->lobes()); }
ConductorBsdf::ConductorBsdf() : _materialName("Cu"), _eta(0.200438f, 0.924033f, 1.10221f), _k(3.91295f, 2.45285f, 2.14219f) { _lobes = BsdfLobes(BsdfLobes::SpecularReflectionLobe); }
MixedBsdf::MixedBsdf(std::shared_ptr<Bsdf> bsdf0, std::shared_ptr<Bsdf> bsdf1, float ratio) : _bsdf0(bsdf0), _bsdf1(bsdf1), _ratio(std::make_shared<ConstantTexture>(ratio)) { _lobes = BsdfLobes(_bsdf0->lobes(), _bsdf1->lobes()); }
ThinSheetBsdf::ThinSheetBsdf() : _ior(1.5f), _enableInterference(false), _thickness(std::make_shared<ConstantTexture>(0.5f)), _sigmaA(0.0f) { _lobes = BsdfLobes(BsdfLobes::SpecularReflectionLobe | BsdfLobes::ForwardLobe); }
RoughWireBcsdf::RoughWireBcsdf() : _materialName("Cu"), _eta(0.200438f, 0.924033f, 1.10221f), _k(3.91295f, 2.45285f, 2.14219f), _roughness(0.1f) { _lobes = BsdfLobes(BsdfLobes::GlossyLobe | BsdfLobes::AnisotropicLobe); }
RoughPlasticBsdf::RoughPlasticBsdf() : _ior(1.5f), _thickness(1.0f), _sigmaA(0.0f), _distribution("ggx"), _roughness(std::make_shared<ConstantTexture>(0.02f)) { _lobes = BsdfLobes(BsdfLobes::GlossyReflectionLobe | BsdfLobes::DiffuseReflectionLobe); }
HairBcsdf::HairBcsdf() : _scaleAngleDeg(2.0f), _melaninRatio(0.5f), _melaninConcentration(0.25f), _overridesSigmaA(false), _sigmaA(0.0f), _roughness(0.1f) { _lobes = BsdfLobes(BsdfLobes::GlossyLobe | BsdfLobes::AnisotropicLobe); }
OrenNayarBsdf::OrenNayarBsdf() : _roughness(std::make_shared<ConstantTexture>(1.0f)) { _lobes = BsdfLobes(BsdfLobes::DiffuseReflectionLobe); }
LambertBsdf::LambertBsdf() { _lobes = BsdfLobes(BsdfLobes::DiffuseReflectionLobe); }
void TransparencyBsdf::prepareForRender() { _lobes = BsdfLobes(BsdfLobes::ForwardLobe, _base->lobes()); }
void MixedBsdf::prepareForRender() { _lobes = BsdfLobes(_bsdf0->lobes(), _bsdf1->lobes()); }