diff options
author | Sergey Sharybin <sergey@blender.org> | 2021-10-19 13:00:41 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2021-10-19 13:10:29 +0300 |
commit | c107a3c4d9a540a287e21c517d353b670a71a0b5 (patch) | |
tree | d7c239ffdace5eecb618129b16ea06d4506d3d14 | |
parent | 765eba5a6e0322db7ffdc0fb582f8c9645bbbb6b (diff) |
Fix invalid principled diffuse in Cycles OSL
Need to initialize components for the full Diffuse BSDF.
Steps to reproduce:
- Default cube scene
- Switch to Cycles renderer
- Enable OSL backend
- Start viewport render
- Observe cube being much black
Differential Revision: https://developer.blender.org/D12921
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_principled_diffuse.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_principled_diffuse.h b/intern/cycles/kernel/closure/bsdf_principled_diffuse.h index 6d25daa2356..74390f768a2 100644 --- a/intern/cycles/kernel/closure/bsdf_principled_diffuse.h +++ b/intern/cycles/kernel/closure/bsdf_principled_diffuse.h @@ -49,6 +49,7 @@ static_assert(sizeof(ShaderClosure) >= sizeof(PrincipledDiffuseBsdf), ccl_device int bsdf_principled_diffuse_setup(ccl_private PrincipledDiffuseBsdf *bsdf) { bsdf->type = CLOSURE_BSDF_PRINCIPLED_DIFFUSE_ID; + bsdf->components = PRINCIPLED_DIFFUSE_FULL; return SD_BSDF | SD_BSDF_HAS_EVAL; } |