Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2020-05-14 23:12:29 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2020-05-15 01:52:57 +0300
commitc880e54a95dd352262f71cb0834e01fdfbdf000c (patch)
tree09c788518e44ddd1b2d08b50980d3b9bff9fd602 /intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h
parent8d918fe0f2c732258855783b273a9b6a6b429ad7 (diff)
Cycles: Refactor microfacet BSDFs to remove separate anisotropy code
Since the sampling and evaluation functions handle both cases anyways, there's not really a point for keeping the distinction in the kernel, so we might as well cut down the number of CLOSURE_BSDF_MICROFACETs a bit. Differential Revision: https://developer.blender.org/D7736
Diffstat (limited to 'intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h')
-rw-r--r--intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h b/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h
index 6495ae743ab..0d50172a907 100644
--- a/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h
+++ b/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h
@@ -34,18 +34,9 @@ CCL_NAMESPACE_BEGIN
ccl_device int bsdf_ashikhmin_shirley_setup(MicrofacetBsdf *bsdf)
{
bsdf->alpha_x = clamp(bsdf->alpha_x, 1e-4f, 1.0f);
- bsdf->alpha_y = bsdf->alpha_x;
-
- bsdf->type = CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID;
- return SD_BSDF | SD_BSDF_HAS_EVAL;
-}
-
-ccl_device int bsdf_ashikhmin_shirley_aniso_setup(MicrofacetBsdf *bsdf)
-{
- bsdf->alpha_x = clamp(bsdf->alpha_x, 1e-4f, 1.0f);
bsdf->alpha_y = clamp(bsdf->alpha_y, 1e-4f, 1.0f);
- bsdf->type = CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ANISO_ID;
+ bsdf->type = CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID;
return SD_BSDF | SD_BSDF_HAS_EVAL;
}