diff options
author | Patrick Mours <pmours@nvidia.com> | 2022-09-12 19:46:20 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2022-09-13 11:59:28 +0300 |
commit | a45c36efae07f22dd1da1ebac728324aeafce85e (patch) | |
tree | 842f27474a4b011786da5ef07ed5c6630e8203a9 /intern/cycles/kernel/closure/bsdf.h | |
parent | 8e03df9bbc22baaf9d538e01c44f6857a8c9b43a (diff) |
Cycles: Make OSL implementation independent from SVM
Cleans up the file structure to be more similar to that of the SVM
and also makes it possible to build kernels with OSL support, but
without having to include SVM support.
This patch was split from D15902.
Differential Revision: https://developer.blender.org/D15949
Diffstat (limited to 'intern/cycles/kernel/closure/bsdf.h')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/closure/bsdf.h b/intern/cycles/kernel/closure/bsdf.h index 02cf8bfe3e2..f0b28ff77c4 100644 --- a/intern/cycles/kernel/closure/bsdf.h +++ b/intern/cycles/kernel/closure/bsdf.h @@ -116,7 +116,7 @@ ccl_device_inline int bsdf_sample(KernelGlobals kg, case CLOSURE_BSDF_DIFFUSE_ID: label = bsdf_diffuse_sample(sc, Ng, sd->I, randu, randv, eval, omega_in, pdf); break; -#ifdef __SVM__ +#if defined(__SVM__) || defined(__OSL__) case CLOSURE_BSDF_OREN_NAYAR_ID: label = bsdf_oren_nayar_sample(sc, Ng, sd->I, randu, randv, eval, omega_in, pdf); break; @@ -246,7 +246,7 @@ ccl_device_inline case CLOSURE_BSDF_DIFFUSE_ID: eval = bsdf_diffuse_eval_reflect(sc, sd->I, omega_in, pdf); break; -#ifdef __SVM__ +#if defined(__SVM__) || defined(__OSL__) case CLOSURE_BSDF_OREN_NAYAR_ID: eval = bsdf_oren_nayar_eval_reflect(sc, sd->I, omega_in, pdf); break; @@ -337,7 +337,7 @@ ccl_device_inline case CLOSURE_BSDF_DIFFUSE_ID: eval = bsdf_diffuse_eval_transmit(sc, sd->I, omega_in, pdf); break; -#ifdef __SVM__ +#if defined(__SVM__) || defined(__OSL__) case CLOSURE_BSDF_OREN_NAYAR_ID: eval = bsdf_oren_nayar_eval_transmit(sc, sd->I, omega_in, pdf); break; @@ -419,7 +419,7 @@ ccl_device_inline ccl_device void bsdf_blur(KernelGlobals kg, ccl_private ShaderClosure *sc, float roughness) { /* TODO: do we want to blur volume closures? */ -#ifdef __SVM__ +#if defined(__SVM__) || defined(__OSL__) switch (sc->type) { case CLOSURE_BSDF_MICROFACET_MULTI_GGX_ID: case CLOSURE_BSDF_MICROFACET_MULTI_GGX_FRESNEL_ID: |