diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:17:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:17:58 +0300 |
commit | 1daa20ad9f6f0c433a4e0a97a74e5beb9ea4e2c7 (patch) | |
tree | 982857c47d650cb3f53df065cdcbcca827bff56d /intern/cycles/kernel/closure/bsdf_microfacet.h | |
parent | 62fbb7d4a10bea1ce88a486657a87743b93c9fd1 (diff) |
Cleanup: strip trailing space for cycles
Diffstat (limited to 'intern/cycles/kernel/closure/bsdf_microfacet.h')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_microfacet.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_microfacet.h b/intern/cycles/kernel/closure/bsdf_microfacet.h index 2dd59354058..e74d5ebaa42 100644 --- a/intern/cycles/kernel/closure/bsdf_microfacet.h +++ b/intern/cycles/kernel/closure/bsdf_microfacet.h @@ -231,7 +231,7 @@ ccl_device_forceinline float3 microfacet_sample_stretched( /* 5. compute normal */ return normalize(make_float3(-slope_x, -slope_y, 1.0f)); -} +} /* Calculate the reflection color * @@ -434,7 +434,7 @@ ccl_device float3 bsdf_microfacet_ggx_eval_reflect(const ShaderClosure *sc, cons /* eq. 34: now calculate G1(i,m) and G1(o,m) */ G1o = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNO * cosNO) / (cosNO * cosNO))); - G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); + G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); } else { /* anisotropic */ @@ -535,7 +535,7 @@ ccl_device float3 bsdf_microfacet_ggx_eval_transmit(const ShaderClosure *sc, con /* eq. 34: now calculate G1(i,m) and G1(o,m) */ G1o = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNO * cosNO) / (cosNO * cosNO))); - G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); + G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); float G = G1o * G1i; @@ -706,7 +706,7 @@ ccl_device int bsdf_microfacet_ggx_sample(KernelGlobals *kg, const ShaderClosure dIdx, dIdy, &dRdx, &dRdy, &dTdx, &dTdy, #endif &inside); - + if(!inside && fresnel != 1.0f) { *omega_in = T; @@ -733,7 +733,7 @@ ccl_device int bsdf_microfacet_ggx_sample(KernelGlobals *kg, const ShaderClosure float cosNI = dot(N, *omega_in); /* eq. 34: now calculate G1(i,m) */ - float G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); + float G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); /* eq. 21 */ float cosHI = dot(m, *omega_in); @@ -1125,4 +1125,3 @@ ccl_device int bsdf_microfacet_beckmann_sample(KernelGlobals *kg, const ShaderCl CCL_NAMESPACE_END #endif /* __BSDF_MICROFACET_H__ */ - |