| 531 | } |
| 532 | |
| 533 | float evalD(const Vec3 Hr) const |
| 534 | { |
| 535 | float cosThetaM = Hr.z; |
| 536 | if (cosThetaM > 0) { |
| 537 | /* Have these two multiplied by sinThetaM2 for convenience */ |
| 538 | float cosPhi2st2 = SQR(Hr.x / xalpha); |
| 539 | float sinPhi2st2 = SQR(Hr.y / yalpha); |
| 540 | float cosThetaM2 = SQR(cosThetaM); |
| 541 | float cosThetaM4 = SQR(cosThetaM2); |
| 542 | |
| 543 | float tanThetaM2 = (cosPhi2st2 + sinPhi2st2) / cosThetaM2; |
| 544 | |
| 545 | return Distribution::F(tanThetaM2) / (xalpha * yalpha * cosThetaM4); |
| 546 | } |
| 547 | return 0; |
| 548 | } |
| 549 | |
| 550 | Vec3 sampleMicronormal(const Vec3 wo, float randu, float randv) const { |
| 551 | /* Project wo and stretch by alpha values */ |
nothing calls this directly
no outgoing calls
no test coverage detected