(alphaSqr, cosTheta)
| 103 | return alphaSqr / (d * d * math.pi) |
| 104 | |
| 105 | def bsdf_lambda_ggx(alphaSqr, cosTheta): |
| 106 | _cosTheta = torch.clamp(cosTheta, min=specular_epsilon, max=1.0 - specular_epsilon) |
| 107 | cosThetaSqr = _cosTheta * _cosTheta |
| 108 | tanThetaSqr = (1.0 - cosThetaSqr) / cosThetaSqr |
| 109 | res = 0.5 * (torch.sqrt(1 + alphaSqr * tanThetaSqr) - 1.0) |
| 110 | return res |
| 111 | |
| 112 | def bsdf_masking_smith_ggx_correlated(alphaSqr, cosThetaI, cosThetaO): |
| 113 | lambdaI = bsdf_lambda_ggx(alphaSqr, cosThetaI) |
no outgoing calls
no test coverage detected