diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_shader.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h index 64e755cacd7..b410785d7e0 100644 --- a/intern/cycles/kernel/kernel_shader.h +++ b/intern/cycles/kernel/kernel_shader.h @@ -428,36 +428,36 @@ ccl_device_inline void shader_setup_from_volume(KernelGlobals *kg, ShaderData *s sd->time = ray->time; sd->ray_length = 0.0f; /* todo: can we set this to some useful value? */ -#ifdef __INSTANCING__ +# ifdef __INSTANCING__ sd->object = PRIM_NONE; /* todo: fill this for texture coordinates */ -#endif +# endif sd->prim = PRIM_NONE; sd->type = PRIMITIVE_NONE; -#ifdef __UV__ +# ifdef __UV__ sd->u = 0.0f; sd->v = 0.0f; -#endif +# endif -#ifdef __DPDU__ +# ifdef __DPDU__ /* dPdu/dPdv */ sd->dPdu = make_float3(0.0f, 0.0f, 0.0f); sd->dPdv = make_float3(0.0f, 0.0f, 0.0f); -#endif +# endif -#ifdef __RAY_DIFFERENTIALS__ +# ifdef __RAY_DIFFERENTIALS__ /* differentials */ sd->dP = ray->dD; differential_incoming(&sd->dI, sd->dP); sd->du = differential_zero(); sd->dv = differential_zero(); -#endif +# endif /* for NDC coordinates */ sd->ray_P = ray->P; sd->ray_dP = ray->dP; } -#endif +#endif /* __VOLUME__ */ /* Merging */ @@ -492,7 +492,7 @@ ccl_device_inline void shader_merge_closures(ShaderData *sd) } } } -#endif +#endif /* __BRANCHED_PATH__ || __VOLUME__ */ /* Defensive sampling. */ @@ -571,7 +571,7 @@ ccl_device_inline void _shader_bsdf_multi_eval_branched(KernelGlobals *kg, } } } -#endif +#endif /* __BRANCHED_PATH__ */ #ifndef __KERNEL_CUDA__ @@ -922,7 +922,7 @@ ccl_device float3 shader_bssrdf_sum(ShaderData *sd, float3 *N_, float *texture_b return eval; } -#endif +#endif /* __SUBSURFACE__ */ /* Emission */ @@ -1001,12 +1001,12 @@ ccl_device float3 shader_eval_background(KernelGlobals *kg, ShaderData *sd, sd->num_closure_extra = 0; #ifdef __SVM__ -#ifdef __OSL__ +# ifdef __OSL__ if(kg->osl) { OSLShader::eval_background(kg, sd, state, path_flag); } else -#endif +# endif /* __OSL__ */ { svm_eval_nodes(kg, sd, state, SHADER_TYPE_SURFACE, path_flag); } @@ -1021,9 +1021,9 @@ ccl_device float3 shader_eval_background(KernelGlobals *kg, ShaderData *sd, } return eval; -#else +#else /* __SVM__ */ return make_float3(0.8f, 0.8f, 0.8f); -#endif +#endif /* __SVM__ */ } /* Volume */ @@ -1191,7 +1191,7 @@ ccl_device_inline void shader_eval_volume(KernelGlobals *kg, } } -#endif +#endif /* __VOLUME__ */ /* Displacement Evaluation */ @@ -1236,6 +1236,6 @@ ccl_device bool shader_transparent_shadow(KernelGlobals *kg, Intersection *isect return (flag & SD_HAS_TRANSPARENT_SHADOW) != 0; } -#endif +#endif /* __TRANSPARENT_SHADOWS__ */ CCL_NAMESPACE_END |