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:
authorSebastian Herhoz <sebastian.herholz@intel.com>2022-09-21 18:46:10 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-09-27 16:47:03 +0300
commitbd249eb4f37e65b2f4b3deef775bb136a2c234d1 (patch)
treeb25c4fa279f5d89929c81a901a81c4cd14ea5f81 /intern/cycles/kernel/svm
parent715c86d9e58f44ed078dd61c1fed45739bf65723 (diff)
Cycles: BSDF changes in preparation of path guiding
* Return roughness and IOR for BSDF sampling * Add functions to query IOR and label for given BSDF * Default IOR to 1.0 instead of 0.0 for BSDFs that don't use it * Ensure pdf >= 0.0 in case of numerical precision issues Ref T92571, D15286
Diffstat (limited to 'intern/cycles/kernel/svm')
-rw-r--r--intern/cycles/kernel/svm/closure.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/svm/closure.h b/intern/cycles/kernel/svm/closure.h
index 2d91b014f60..d18f2cc0854 100644
--- a/intern/cycles/kernel/svm/closure.h
+++ b/intern/cycles/kernel/svm/closure.h
@@ -31,7 +31,7 @@ ccl_device void svm_node_glass_setup(ccl_private ShaderData *sd,
else {
bsdf->alpha_y = 0.0f;
bsdf->alpha_x = 0.0f;
- bsdf->ior = 0.0f;
+ bsdf->ior = eta;
sd->flag |= bsdf_reflection_setup(bsdf);
}
}
@@ -542,7 +542,7 @@ ccl_device_noinline int svm_node_closure_bsdf(KernelGlobals kg,
float roughness = sqr(param1);
bsdf->N = N;
- bsdf->ior = 0.0f;
+ bsdf->ior = 1.0f;
bsdf->extra = NULL;
if (data_node.y == SVM_STACK_INVALID) {