diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-12-06 17:57:16 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-12-14 13:04:02 +0300 |
commit | c4d6fd3ec04a93376d08e7baa89846732c01ec04 (patch) | |
tree | 81fdb9ba29ceabad0dba9155eda988d1443afa98 /intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h | |
parent | 72d18c195eea7aa6be43afbda7dab584893c1882 (diff) |
Cycles: Consider GGX/Beckmann/Ashikhmin of 0 roughness a singular ray
This matches behavior of Multiscatter GGX and could become handy later on
when/if we decide it would be beneficial to replace on closure with another.
Reviewers: lukasstockner97, brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D2413
Diffstat (limited to 'intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h b/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h index 1cd8246aa71..b6c896c754b 100644 --- a/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h +++ b/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h @@ -143,6 +143,7 @@ ccl_device int bsdf_ashikhmin_shirley_sample(const ShaderClosure *sc, float3 Ng, { const MicrofacetBsdf *bsdf = (const MicrofacetBsdf*)sc; float3 N = bsdf->N; + int label = LABEL_REFLECT | LABEL_GLOSSY; float NdotI = dot(N, I); if(NdotI > 0.0f) { @@ -211,6 +212,7 @@ ccl_device int bsdf_ashikhmin_shirley_sample(const ShaderClosure *sc, float3 Ng, /* Some high number for MIS. */ *pdf = 1e6f; *eval = make_float3(1e6f, 1e6f, 1e6f); + label = LABEL_REFLECT | LABEL_SINGULAR; } else { /* leave the rest to eval_reflect */ @@ -224,7 +226,7 @@ ccl_device int bsdf_ashikhmin_shirley_sample(const ShaderClosure *sc, float3 Ng, #endif } - return LABEL_REFLECT|LABEL_GLOSSY; + return label; } |