29 float tmp = (1.0f - wm.
z) +
alpha * wm.
z;
36 float slope_x = -wm.
x /
alpha.x;
37 float slope_y = -wm.
y /
alpha.y;
38 float tmp = wm.
z * wm.
z + slope_x * slope_x + slope_y * slope_y;
48 if (cosI > 0.9999f ||
fabsf(cosI) < 1e-6f) {
49 const float r =
sqrtf(randx /
max(1.0f - randx, 1e-7f));
50 const float phi =
M_2PI_F * randy;
54 const float sinI =
safe_sqrtf(1.0f - cosI * cosI);
55 const float tanI = sinI / cosI;
56 const float projA = 0.5f * (cosI + 1.0f);
59 const float A = 2.0f * randx * projA / cosI - 1.0f;
60 float tmp =
A *
A - 1.0f;
61 if (
fabsf(tmp) < 1e-7f)
64 const float D =
safe_sqrtf(tanI * tanI * tmp * tmp - (
A *
A - tanI * tanI) * tmp);
66 const float slopeX2 = tanI * tmp +
D;
67 const float slopeX = (
A < 0.0f || slopeX2 > 1.0f / tanI) ? (tanI * tmp -
D) : slopeX2;
71 U2 = 2.0f * (randy - 0.5f);
73 U2 = 2.0f * (0.5f - randy);
74 const float z = (U2 * (U2 * (U2 * 0.27385f - 0.73369f) + 0.46341f)) /
75 (U2 * (U2 * (U2 * 0.093073f + 0.309420f) - 1.0f) + 0.597999f);
76 const float slopeY =
z *
sqrtf(1.0f + slopeX * slopeX);
95 const float slope_x =
alpha.x * (cossin_phi.
x * slope_11.
x - cossin_phi.
y * slope_11.
y);
96 const float slope_y =
alpha.y * (cossin_phi.
y * slope_11.
x + cossin_phi.
x * slope_11.
y);
109 return -wi + 2.0f * wm *
dot(wi, wm);
124 float pArea = (
w.z < -0.9999f) ? 1.0f : lambda *
w.z;
126 const float dotW_WH =
dot(-
w, wh);
130 float phase =
max(0.0f, dotW_WH) * 0.25f /
max(pArea * dotW_WH, 1e-7f);
142 const float3 wi,
const float eta,
const float3 wm,
const float randV,
bool *outside)
144 float cosI =
dot(wi, wm);
148 return -wi + 2.0f * wm * cosI;
151 float inv_eta = 1.0f / eta;
152 float cosT = -
safe_sqrtf(1.0f - (1.0f - cosI * cosI) * inv_eta * inv_eta);
153 return normalize(wm * (cosI * inv_eta + cosT) - wi * inv_eta);
159 const bool wo_outside,
166 float pArea = (
w.z < -0.9999f) ? 1.0f : lambda *
w.z;
173 const float dotW_WH =
dot(-
w, wh);
181 const float dotW_WH =
dot(-
w, wh), dotWO_WH =
dot(wo, wh);
185 float temp = dotW_WH + eta * dotWO_WH;
200 else if (
w.z < -0.9999f)
203 const float inv_wz2 = 1.0f /
max(
w.z *
w.z, 1e-7f);
205 float v =
sqrtf(1.0f +
dot(wa, wa) * inv_wz2);
209 return 0.5f * (
v - 1.0f);
230 return powf(C1, lambda);
236 const float3 w,
float *h,
float *C1,
float *G1,
float *lambda,
const float U)
240 if (
w.z < -0.9999f) {
243 *G1 =
mf_G1(
w, *C1, *lambda);
245 else if (
fabsf(
w.z) >= 0.0001f) {
248 if (*lambda >= 0.0f) {
252 *C1 *=
powf(1.0f -
U, -1.0f / *lambda);
255 *G1 =
mf_G1(
w, *C1, *lambda);
268 float albedo = 0.806495f *
expf(-1.98712f *
r *
r) + 0.199531f;
269 albedo -= ((((((1.76741f *
r - 8.43891f) *
r + 15.784f) *
r - 14.398f) *
r + 6.45221f) *
r -
284 ior =
clamp(ior, 1.0f, 3.0f);
285 float I_1 = 0.0476898f *
expf(-0.978352f * (ior - 0.65657f) * (ior - 0.65657f)) -
286 0.033756f * ior + 0.993261f;
287 float R_1 = (((0.116991f *
a - 0.270369f) *
a + 0.0501366f) *
a - 0.00411511f) *
a + 1.00008f;
288 float I_2 = (((-2.08704f * ior + 26.3298f) * ior - 127.906f) * ior + 292.958f) * ior - 287.946f +
289 199.803f / (ior * ior) - 101.668f / (ior * ior * ior);
290 float R_2 = ((((5.3725f *
a - 24.9307f) *
a + 22.7437f) *
a - 3.40751f) *
a + 0.0986325f) *
a +
293 return saturate(1.0f + I_2 * R_2 * 0.0019127f - (1.0f - I_1) * (1.0f - R_1) * 9.3205f);
300 float singlescatter = 0.25f *
D /
max((1.0f + lambda) * wi.
z, 1e-7f);
305 return albedo * singlescatter + (1.0f - albedo) * multiscatter;
312 float singlescatter = 0.25f *
D /
max((1.0f + lambda) * wi.
z, 1e-7f);
317 return albedo * singlescatter + (1.0f - albedo) * multiscatter;
325 bool reflective = (wi.
z * wo.
z > 0.0f);
331 float3 r_wi = (wi.
z < 0.0f) ? -wi : wi;
338 float singlescatter = 0.25f *
D /
max((1.0f + lambda) * r_wi.
z, 1e-7f);
340 return fresnel * (albedo * singlescatter + (1.0f - albedo) * multiscatter);
343 float singlescatter =
fabsf(
dot(r_wi, wh) *
dot(wo, wh) *
D * eta * eta /
344 max((1.0f + lambda) * r_wi.
z * wh_len * wh_len, 1e-7f));
346 return (1.0f - fresnel) * (albedo * singlescatter + (1.0f - albedo) * multiscatter);
353 #define MF_NAME_JOIN(x, y) x##_##y
354 #define MF_NAME_EVAL(x, y) MF_NAME_JOIN(x, y)
355 #define MF_FUNCTION_FULL_NAME(prefix) MF_NAME_EVAL(prefix, MF_PHASE_FUNCTION)
357 #define MF_PHASE_FUNCTION glass
358 #define MF_MULTI_GLASS
361 #define MF_PHASE_FUNCTION glossy
362 #define MF_MULTI_GLOSSY
457 return mf_eval_glossy(localI,
490 *omega_in = 2 *
dot(
Z,
I) *
Z -
I;
493 #ifdef __RAY_DIFFERENTIALS__
494 *domega_in_dx = (2 *
dot(
Z, dIdx)) *
Z - dIdx;
495 *domega_in_dy = (2 *
dot(
Z, dIdy)) *
Z - dIdy;
511 *eval = mf_sample_glossy(localI,
526 *omega_in =
X * localO.
x +
Y * localO.
y +
Z * localO.
z;
528 #ifdef __RAY_DIFFERENTIALS__
529 *domega_in_dx = (2 *
dot(
Z, dIdx)) *
Z - dIdx;
530 *domega_in_dy = (2 *
dot(
Z, dIdy)) *
Z - dIdy;
585 return mf_eval_glass(localI,
619 return mf_eval_glass(localI,
653 #ifdef __RAY_DIFFERENTIALS__
654 float3 dRdx, dRdy, dTdx, dTdy;
674 if (randu < fresnel) {
676 #ifdef __RAY_DIFFERENTIALS__
677 *domega_in_dx = dRdx;
678 *domega_in_dy = dRdy;
684 #ifdef __RAY_DIFFERENTIALS__
685 *domega_in_dx = dTdx;
686 *domega_in_dy = dTdy;
699 *eval = mf_sample_glass(localI,
711 *omega_in =
X * localO.
x +
Y * localO.
y +
Z * localO.
z;
712 if (localO.
z * localI.
z > 0.0f) {
713 #ifdef __RAY_DIFFERENTIALS__
714 *domega_in_dx = (2 *
dot(
Z, dIdx)) *
Z - dIdx;
715 *domega_in_dy = (2 *
dot(
Z, dIdy)) *
Z - dIdy;
720 #ifdef __RAY_DIFFERENTIALS__
721 float cosI =
dot(
Z,
I);
722 float dnp =
max(
sqrtf(1.0f - (bsdf->
ior * bsdf->
ior * (1.0f - cosI * cosI))), 1e-7f);
723 *domega_in_dx = -(bsdf->
ior * dIdx) +
724 ((bsdf->
ior - bsdf->
ior * bsdf->
ior * cosI / dnp) *
dot(dIdx,
Z)) *
Z;
725 *domega_in_dy = -(bsdf->
ior * dIdy) +
726 ((bsdf->
ior - bsdf->
ior * bsdf->
ior * cosI / dnp) *
dot(dIdy,
Z)) *
Z;
MINLINE float safe_sqrtf(float a)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
ATTR_WARN_UNUSED_RESULT const BMVert * v
ccl_device_forceinline void bsdf_microfacet_fresnel_color(const ShaderData *sd, MicrofacetBsdf *bsdf)
ccl_device int bsdf_microfacet_multi_ggx_fresnel_setup(MicrofacetBsdf *bsdf, const ShaderData *sd)
ccl_device float3 bsdf_microfacet_multi_ggx_eval_transmit(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf, ccl_addr_space uint *lcg_state)
ccl_device_forceinline bool mf_sample_height(const float3 w, float *h, float *C1, float *G1, float *lambda, const float U)
ccl_device int bsdf_microfacet_multi_ggx_glass_sample(KernelGlobals *kg, const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf, ccl_addr_space uint *lcg_state)
ccl_device_forceinline float3 mf_eval_phase_glossy(const float3 w, const float lambda, const float3 wo, const float2 alpha)
ccl_device float3 bsdf_microfacet_multi_ggx_glass_eval_transmit(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf, ccl_addr_space uint *lcg_state)
ccl_device void bsdf_microfacet_multi_ggx_blur(ShaderClosure *sc, float roughness)
ccl_device_forceinline float D_ggx_aniso(const float3 wm, const float2 alpha)
ccl_device_forceinline float mf_C1(const float h)
ccl_device float3 bsdf_microfacet_multi_ggx_glass_eval_reflect(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf, ccl_addr_space uint *lcg_state)
ccl_device float3 bsdf_microfacet_multi_ggx_eval_reflect(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf, ccl_addr_space uint *lcg_state)
ccl_device_forceinline float mf_lambda(const float3 w, const float2 alpha)
ccl_device_forceinline float mf_invC1(const float h)
ccl_device_forceinline float3 mf_eval_phase_glass(const float3 w, const float lambda, const float3 wo, const bool wo_outside, const float2 alpha, const float eta)
ccl_device int bsdf_microfacet_multi_ggx_setup(MicrofacetBsdf *bsdf)
ccl_device_forceinline float3 mf_sample_phase_glass(const float3 wi, const float eta, const float3 wm, const float randV, bool *outside)
ccl_device_forceinline float mf_ggx_aniso_pdf(const float3 wi, const float3 wo, const float2 alpha)
ccl_device_forceinline float mf_glass_pdf(const float3 wi, const float3 wo, const float alpha, const float eta)
CCL_NAMESPACE_BEGIN ccl_device_forceinline float D_ggx(float3 wm, float alpha)
ccl_device int bsdf_microfacet_multi_ggx_refraction_setup(MicrofacetBsdf *bsdf)
ccl_device_forceinline float3 mf_sample_vndf(const float3 wi, const float2 alpha, const float randx, const float randy)
ccl_device_forceinline float2 mf_sampleP22_11(const float cosI, const float randx, const float randy)
ccl_device_forceinline float3 mf_sample_phase_glossy(const float3 wi, float3 *weight, const float3 wm)
ccl_device_inline float mf_ggx_transmission_albedo(float a, float ior)
ccl_device int bsdf_microfacet_multi_ggx_glass_fresnel_setup(MicrofacetBsdf *bsdf, const ShaderData *sd)
ccl_device_forceinline float mf_G1(const float3 w, const float C1, const float lambda)
ccl_device int bsdf_microfacet_multi_ggx_sample(KernelGlobals *kg, const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf, ccl_addr_space uint *lcg_state)
ccl_device int bsdf_microfacet_multi_ggx_glass_setup(MicrofacetBsdf *bsdf)
ccl_device_forceinline float mf_ggx_albedo(float r)
ccl_device_forceinline float mf_ggx_pdf(const float3 wi, const float3 wo, const float alpha)
ccl_device int bsdf_microfacet_multi_ggx_common_setup(MicrofacetBsdf *bsdf)
ccl_device float fresnel_dielectric_cos(float cosi, float eta)
CCL_NAMESPACE_BEGIN ccl_device float fresnel_dielectric(float eta, const float3 N, const float3 I, float3 *R, float3 *T, bool *is_inside)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
static CCL_NAMESPACE_BEGIN const double alpha
#define kernel_assert(cond)
#define ccl_device_forceinline
#define ccl_device_inline
#define CCL_NAMESPACE_END
#define make_float2(x, y)
#define make_float3(x, y, z)
ccl_device void make_orthonormals_tangent(const float3 N, const float3 T, float3 *a, float3 *b)
#define __RAY_DIFFERENTIALS__
static const pxr::TfToken roughness("roughness", pxr::TfToken::Immortal)
@ CLOSURE_BSDF_MICROFACET_MULTI_GGX_ID
@ CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID
@ CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_FRESNEL_ID
@ CLOSURE_BSDF_MICROFACET_MULTI_GGX_FRESNEL_ID
ccl_device_inline float saturate(float a)
ccl_device_inline void make_orthonormals(const float3 N, float3 *a, float3 *b)
ccl_device_inline int clamp(int a, int mn, int mx)
ccl_device_inline float2 normalize(const float2 &a)
ccl_device_inline float dot(const float2 &a, const float2 &b)
ccl_device_inline float2 safe_normalize(const float2 &a)
ccl_device_inline float2 normalize_len(const float2 &a, float *t)
ccl_device_inline bool is_zero(const float2 &a)
ccl_device_inline float3 saturate3(float3 a)
BLI_INLINE float D(const float *data, const int res[3], int x, int y, int z)