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
This commit is contained in:
Sergey Sharybin 2021-10-19 12:00:41 +02:00
parent 765eba5a6e
commit c107a3c4d9
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}