diff options
Diffstat (limited to 'intern/cycles/kernel/closure/bsdf_refraction.h')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_refraction.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_refraction.h b/intern/cycles/kernel/closure/bsdf_refraction.h index e680a9617db..34836206ddf 100644 --- a/intern/cycles/kernel/closure/bsdf_refraction.h +++ b/intern/cycles/kernel/closure/bsdf_refraction.h @@ -43,10 +43,13 @@ ccl_device int bsdf_refraction_sample(ccl_private const ShaderClosure *sc, float randv, ccl_private Spectrum *eval, ccl_private float3 *omega_in, - ccl_private float *pdf) + ccl_private float *pdf, + ccl_private float *eta) { ccl_private const MicrofacetBsdf *bsdf = (ccl_private const MicrofacetBsdf *)sc; float m_eta = bsdf->ior; + + *eta = 1.0f / m_eta; float3 N = bsdf->N; float3 R, T; |