| 217 | }; |
| 218 | |
| 219 | inline Vec3fa Velvety__eval(const Velvety* This, |
| 220 | const Vec3fa &wo, const DifferentialGeometry &dg, const Vec3fa &wi) |
| 221 | { |
| 222 | const float cosThetaO = clamp(dot(wo,dg.Ns)); |
| 223 | const float cosThetaI = clamp(dot(wi,dg.Ns)); |
| 224 | const float sinThetaO = sqrt(1.0f - cosThetaO * cosThetaO); |
| 225 | const float horizonScatter = powf(sinThetaO, This->f); |
| 226 | return (horizonScatter * cosThetaI * float(one_over_pi)) * This->R; |
| 227 | } |
| 228 | |
| 229 | inline Vec3fa Velvety__sample(const Velvety* This, |
| 230 | const Vec3fa &wo, |
no test coverage detected