mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Cycles: BSDF ensuring that eval, pdf and label are intialized to zero and None
This commit is contained in:
parent
263bf63509
commit
d864b5ce28
1 changed files with 4 additions and 1 deletions
|
|
@ -118,7 +118,9 @@ ccl_device_inline int bsdf_sample(KernelGlobals kg,
|
|||
{
|
||||
/* For curves use the smooth normal, particularly for ribbons the geometric
|
||||
* normal gives too much darkening otherwise. */
|
||||
int label;
|
||||
*eval = zero_spectrum();
|
||||
*pdf = 0.f;
|
||||
int label = LABEL_NONE;
|
||||
const float3 Ng = (sd->type & PRIMITIVE_CURVE) ? sc->N : sd->Ng;
|
||||
|
||||
switch (sc->type) {
|
||||
|
|
@ -536,6 +538,7 @@ ccl_device_inline
|
|||
ccl_private float *pdf)
|
||||
{
|
||||
Spectrum eval = zero_spectrum();
|
||||
*pdf = 0.f;
|
||||
|
||||
switch (sc->type) {
|
||||
case CLOSURE_BSDF_DIFFUSE_ID:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue