Blender V5.0
osl.h File Reference

Go to the source code of this file.

Macros

#define OSL_CLOSURE_STRUCT_BEGIN(Upper, lower)
#define OSL_CLOSURE_STRUCT_END(Upper, lower)
#define OSL_CLOSURE_STRUCT_MEMBER(Upper, TYPE, type, name, key)
#define OSL_CLOSURE_STRUCT_ARRAY_MEMBER(Upper, TYPE, type, name, key, size)

Functions

CCL_NAMESPACE_BEGIN ccl_device_inline void shaderdata_to_shaderglobals (ccl_private ShaderData *sd, const uint32_t path_flag, ccl_private ShaderGlobals *globals)
ccl_device void flatten_closure_tree (KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const ccl_private OSLClosure *closure)
template<ShaderType type>
void osl_eval_nodes (const ThreadKernelGlobalsCPU *kg, const void *state, ShaderData *sd, uint32_t path_flag)

Macro Definition Documentation

◆ OSL_CLOSURE_STRUCT_ARRAY_MEMBER

#define OSL_CLOSURE_STRUCT_ARRAY_MEMBER ( Upper,
TYPE,
type,
name,
key,
size )

◆ OSL_CLOSURE_STRUCT_BEGIN

#define OSL_CLOSURE_STRUCT_BEGIN ( Upper,
lower )
Value:
case OSL_CLOSURE_##Upper##_ID: { \
ccl_private const OSLClosureComponent *comp = \
static_cast<ccl_private const OSLClosureComponent *>(closure); \
float3 albedo = one_float3(); \
osl_closure_##lower##_setup(kg, \
sd, \
path_flag, \
weight * comp->weight, \
reinterpret_cast<ccl_private const Upper##Closure *>(comp + 1), \
(layer_stack_level >= 0) ? &albedo : nullptr); \
if (layer_stack_level >= 0) { \
layer_albedo += albedo; \
} \
break; \
}
#define ccl_private
ccl_device_inline float3 one_float3()
Definition math_float3.h:26

◆ OSL_CLOSURE_STRUCT_END

#define OSL_CLOSURE_STRUCT_END ( Upper,
lower )

◆ OSL_CLOSURE_STRUCT_MEMBER

#define OSL_CLOSURE_STRUCT_MEMBER ( Upper,
TYPE,
type,
name,
key )

Function Documentation

◆ flatten_closure_tree()

◆ osl_eval_nodes()

template<ShaderType type>
void osl_eval_nodes ( const ThreadKernelGlobalsCPU * kg,
const void * state,
ShaderData * sd,
uint32_t path_flag )

◆ shaderdata_to_shaderglobals()