| 101 | template <int trans> |
| 102 | struct Diffuse : public BSDF, DiffuseParams { |
| 103 | Diffuse(const DiffuseParams& params) : BSDF(), DiffuseParams(params) { if (trans) N = -N; } |
| 104 | virtual float eval (const OSL::ShaderGlobals& sg, const OSL::Vec3& wi, float& pdf) const { |
| 105 | pdf = std::max(N.dot(wi), 0.0f) * float(M_1_PI); |
| 106 | return 1.0f; |
nothing calls this directly
no outgoing calls
no test coverage detected