2022-02-11 13:53:21 +01:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2012-11-06 19:59:07 +00:00
|
|
|
*
|
2022-02-11 13:53:21 +01:00
|
|
|
* Adapted from Open Shading Language
|
2012-11-06 19:59:07 +00:00
|
|
|
* Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
2022-02-11 13:53:21 +01:00
|
|
|
* Modifications Copyright 2011-2022 Blender Foundation. */
|
2012-11-06 19:59:07 +00:00
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
#pragma once
|
2012-11-06 19:59:07 +00:00
|
|
|
|
2022-07-29 13:41:37 +02:00
|
|
|
#include "kernel/util/color.h"
|
|
|
|
|
2012-11-06 19:59:07 +00:00
|
|
|
CCL_NAMESPACE_BEGIN
|
|
|
|
|
2016-07-25 03:03:23 +02:00
|
|
|
#ifdef __OSL__
|
|
|
|
|
Cycles: Kernel address space changes for MSL
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation.
MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness.
The vast majority of deltas in this patch fall into one of two cases:
- Ensuring ccl_private is specified for thread-local pointer types
- Ensuring ccl_global is specified for device-wide pointer types
Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant.
In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture.
The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D12864
2021-10-14 13:53:40 +01:00
|
|
|
typedef struct PhongRampBsdf {
|
2016-07-25 03:03:23 +02:00
|
|
|
SHADER_CLOSURE_BASE;
|
|
|
|
|
|
|
|
float exponent;
|
Cycles: Kernel address space changes for MSL
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation.
MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness.
The vast majority of deltas in this patch fall into one of two cases:
- Ensuring ccl_private is specified for thread-local pointer types
- Ensuring ccl_global is specified for device-wide pointer types
Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant.
In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture.
The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D12864
2021-10-14 13:53:40 +01:00
|
|
|
ccl_private float3 *colors;
|
2016-07-25 03:03:23 +02:00
|
|
|
} PhongRampBsdf;
|
|
|
|
|
2019-05-28 11:52:26 +02:00
|
|
|
static_assert(sizeof(ShaderClosure) >= sizeof(PhongRampBsdf), "PhongRampBsdf is too large!");
|
|
|
|
|
2016-07-25 03:03:23 +02:00
|
|
|
ccl_device float3 bsdf_phong_ramp_get_color(const float3 colors[8], float pos)
|
2012-11-06 19:59:07 +00:00
|
|
|
{
|
|
|
|
int MAXCOLORS = 8;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-11-06 19:59:07 +00:00
|
|
|
float npos = pos * (float)(MAXCOLORS - 1);
|
2013-06-09 15:09:15 +00:00
|
|
|
int ipos = float_to_int(npos);
|
2014-10-29 09:56:21 +01:00
|
|
|
if (ipos < 0)
|
2013-06-27 16:08:06 +00:00
|
|
|
return colors[0];
|
2014-10-29 09:56:21 +01:00
|
|
|
if (ipos >= (MAXCOLORS - 1))
|
2012-11-06 19:59:07 +00:00
|
|
|
return colors[MAXCOLORS - 1];
|
|
|
|
float offset = npos - (float)ipos;
|
|
|
|
return colors[ipos] * (1.0f - offset) + colors[ipos + 1] * offset;
|
|
|
|
}
|
|
|
|
|
Cycles: Kernel address space changes for MSL
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation.
MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness.
The vast majority of deltas in this patch fall into one of two cases:
- Ensuring ccl_private is specified for thread-local pointer types
- Ensuring ccl_global is specified for device-wide pointer types
Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant.
In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture.
The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D12864
2021-10-14 13:53:40 +01:00
|
|
|
ccl_device int bsdf_phong_ramp_setup(ccl_private PhongRampBsdf *bsdf)
|
2012-11-06 19:59:07 +00:00
|
|
|
{
|
2016-07-25 03:03:23 +02:00
|
|
|
bsdf->type = CLOSURE_BSDF_PHONG_RAMP_ID;
|
|
|
|
bsdf->exponent = max(bsdf->exponent, 0.0f);
|
2014-11-20 07:53:22 +01:00
|
|
|
return SD_BSDF | SD_BSDF_HAS_EVAL;
|
2012-11-06 19:59:07 +00:00
|
|
|
}
|
|
|
|
|
2022-07-29 13:41:37 +02:00
|
|
|
ccl_device Spectrum bsdf_phong_ramp_eval_reflect(ccl_private const ShaderClosure *sc,
|
|
|
|
const float3 I,
|
|
|
|
const float3 omega_in,
|
|
|
|
ccl_private float *pdf)
|
2012-11-06 19:59:07 +00:00
|
|
|
{
|
Cycles: Kernel address space changes for MSL
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation.
MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness.
The vast majority of deltas in this patch fall into one of two cases:
- Ensuring ccl_private is specified for thread-local pointer types
- Ensuring ccl_global is specified for device-wide pointer types
Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant.
In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture.
The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D12864
2021-10-14 13:53:40 +01:00
|
|
|
ccl_private const PhongRampBsdf *bsdf = (ccl_private const PhongRampBsdf *)sc;
|
2016-07-25 03:03:23 +02:00
|
|
|
float m_exponent = bsdf->exponent;
|
|
|
|
float cosNI = dot(bsdf->N, omega_in);
|
|
|
|
float cosNO = dot(bsdf->N, I);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2014-10-29 09:56:21 +01:00
|
|
|
if (cosNI > 0 && cosNO > 0) {
|
2012-11-06 19:59:07 +00:00
|
|
|
// reflect the view vector
|
2016-07-25 03:03:23 +02:00
|
|
|
float3 R = (2 * cosNO) * bsdf->N - I;
|
2012-11-06 19:59:07 +00:00
|
|
|
float cosRI = dot(R, omega_in);
|
2014-10-29 09:56:21 +01:00
|
|
|
if (cosRI > 0) {
|
2012-11-06 19:59:07 +00:00
|
|
|
float cosp = powf(cosRI, m_exponent);
|
2013-05-10 12:51:30 +00:00
|
|
|
float common = 0.5f * M_1_PI_F * cosp;
|
2012-11-06 19:59:07 +00:00
|
|
|
float out = cosNI * (m_exponent + 2) * common;
|
|
|
|
*pdf = (m_exponent + 1) * common;
|
2022-07-29 13:41:37 +02:00
|
|
|
return rgb_to_spectrum(bsdf_phong_ramp_get_color(bsdf->colors, cosp) * out);
|
2012-11-06 19:59:07 +00:00
|
|
|
}
|
|
|
|
}
|
2022-04-28 18:03:24 +02:00
|
|
|
*pdf = 0.0f;
|
2022-07-29 13:41:37 +02:00
|
|
|
return zero_spectrum();
|
2012-11-06 19:59:07 +00:00
|
|
|
}
|
|
|
|
|
Cycles: Kernel address space changes for MSL
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation.
MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness.
The vast majority of deltas in this patch fall into one of two cases:
- Ensuring ccl_private is specified for thread-local pointer types
- Ensuring ccl_global is specified for device-wide pointer types
Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant.
In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture.
The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D12864
2021-10-14 13:53:40 +01:00
|
|
|
ccl_device float3 bsdf_phong_ramp_eval_transmit(ccl_private const ShaderClosure *sc,
|
2016-07-25 03:03:23 +02:00
|
|
|
const float3 I,
|
|
|
|
const float3 omega_in,
|
Cycles: Kernel address space changes for MSL
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation.
MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness.
The vast majority of deltas in this patch fall into one of two cases:
- Ensuring ccl_private is specified for thread-local pointer types
- Ensuring ccl_global is specified for device-wide pointer types
Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant.
In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture.
The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D12864
2021-10-14 13:53:40 +01:00
|
|
|
ccl_private float *pdf)
|
2012-11-06 19:59:07 +00:00
|
|
|
{
|
2022-04-28 18:03:24 +02:00
|
|
|
*pdf = 0.0f;
|
2012-11-06 19:59:07 +00:00
|
|
|
return make_float3(0.0f, 0.0f, 0.0f);
|
|
|
|
}
|
|
|
|
|
Cycles: Kernel address space changes for MSL
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation.
MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness.
The vast majority of deltas in this patch fall into one of two cases:
- Ensuring ccl_private is specified for thread-local pointer types
- Ensuring ccl_global is specified for device-wide pointer types
Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant.
In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture.
The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D12864
2021-10-14 13:53:40 +01:00
|
|
|
ccl_device int bsdf_phong_ramp_sample(ccl_private const ShaderClosure *sc,
|
2016-07-25 03:03:23 +02:00
|
|
|
float3 Ng,
|
|
|
|
float3 I,
|
|
|
|
float3 dIdx,
|
|
|
|
float3 dIdy,
|
|
|
|
float randu,
|
|
|
|
float randv,
|
2022-07-29 13:41:37 +02:00
|
|
|
ccl_private Spectrum *eval,
|
Cycles: Kernel address space changes for MSL
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation.
MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness.
The vast majority of deltas in this patch fall into one of two cases:
- Ensuring ccl_private is specified for thread-local pointer types
- Ensuring ccl_global is specified for device-wide pointer types
Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant.
In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture.
The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D12864
2021-10-14 13:53:40 +01:00
|
|
|
ccl_private float3 *omega_in,
|
|
|
|
ccl_private float3 *domega_in_dx,
|
|
|
|
ccl_private float3 *domega_in_dy,
|
|
|
|
ccl_private float *pdf)
|
2012-11-06 19:59:07 +00:00
|
|
|
{
|
Cycles: Kernel address space changes for MSL
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation.
MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness.
The vast majority of deltas in this patch fall into one of two cases:
- Ensuring ccl_private is specified for thread-local pointer types
- Ensuring ccl_global is specified for device-wide pointer types
Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant.
In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture.
The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D12864
2021-10-14 13:53:40 +01:00
|
|
|
ccl_private const PhongRampBsdf *bsdf = (ccl_private const PhongRampBsdf *)sc;
|
2016-07-25 03:03:23 +02:00
|
|
|
float cosNO = dot(bsdf->N, I);
|
|
|
|
float m_exponent = bsdf->exponent;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2014-10-29 09:56:21 +01:00
|
|
|
if (cosNO > 0) {
|
2012-11-06 19:59:07 +00:00
|
|
|
// reflect the view vector
|
2016-07-25 03:03:23 +02:00
|
|
|
float3 R = (2 * cosNO) * bsdf->N - I;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-11-06 19:59:07 +00:00
|
|
|
# ifdef __RAY_DIFFERENTIALS__
|
2016-07-25 03:03:23 +02:00
|
|
|
*domega_in_dx = (2 * dot(bsdf->N, dIdx)) * bsdf->N - dIdx;
|
|
|
|
*domega_in_dy = (2 * dot(bsdf->N, dIdy)) * bsdf->N - dIdy;
|
2012-11-06 19:59:07 +00:00
|
|
|
# endif
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-11-06 19:59:07 +00:00
|
|
|
float3 T, B;
|
|
|
|
make_orthonormals(R, &T, &B);
|
2013-05-12 14:13:29 +00:00
|
|
|
float phi = M_2PI_F * randu;
|
2012-11-06 19:59:07 +00:00
|
|
|
float cosTheta = powf(randv, 1 / (m_exponent + 1));
|
|
|
|
float sinTheta2 = 1 - cosTheta * cosTheta;
|
|
|
|
float sinTheta = sinTheta2 > 0 ? sqrtf(sinTheta2) : 0;
|
|
|
|
*omega_in = (cosf(phi) * sinTheta) * T + (sinf(phi) * sinTheta) * B + (cosTheta)*R;
|
2014-10-29 09:56:21 +01:00
|
|
|
if (dot(Ng, *omega_in) > 0.0f) {
|
2012-11-06 19:59:07 +00:00
|
|
|
// common terms for pdf and eval
|
2016-07-25 03:03:23 +02:00
|
|
|
float cosNI = dot(bsdf->N, *omega_in);
|
2012-11-06 19:59:07 +00:00
|
|
|
// make sure the direction we chose is still in the right hemisphere
|
2014-10-29 09:56:21 +01:00
|
|
|
if (cosNI > 0) {
|
2012-11-06 19:59:07 +00:00
|
|
|
float cosp = powf(cosTheta, m_exponent);
|
|
|
|
float common = 0.5f * M_1_PI_F * cosp;
|
|
|
|
*pdf = (m_exponent + 1) * common;
|
|
|
|
float out = cosNI * (m_exponent + 2) * common;
|
2022-07-29 13:41:37 +02:00
|
|
|
*eval = rgb_to_spectrum(bsdf_phong_ramp_get_color(bsdf->colors, cosp) * out);
|
2012-11-06 19:59:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-04-28 18:03:24 +02:00
|
|
|
else {
|
2022-07-29 13:41:37 +02:00
|
|
|
*eval = zero_spectrum();
|
2022-04-28 18:03:24 +02:00
|
|
|
*pdf = 0.0f;
|
|
|
|
}
|
2012-11-28 16:42:32 +00:00
|
|
|
return LABEL_REFLECT | LABEL_GLOSSY;
|
2012-11-06 19:59:07 +00:00
|
|
|
}
|
|
|
|
|
2016-07-25 03:03:23 +02:00
|
|
|
#endif /* __OSL__ */
|
2012-11-06 19:59:07 +00:00
|
|
|
|
|
|
|
CCL_NAMESPACE_END
|