7 #ifndef MI_NEURAYLIB_TARGET_CODE_TYPES_H
8 #define MI_NEURAYLIB_TARGET_CODE_TYPES_H
14 #if defined(TARGET_CODE_USE_CUDA_TYPES) && defined(TARGET_CODE_USE_NEURAY_TYPES)
15 #error "Only one of TARGET_CODE_USE_CUDA_TYPES and TARGET_CODE_USE_NEURAY_TYPES may be defined."
18 #if !defined(TARGET_CODE_USE_NEURAY_TYPES) && \
19 (defined(TARGET_CODE_USE_CUDA_TYPES) || defined(__CUDA_ARCH__))
21 #include <vector_types.h>
93 template<
bool with_derivatives>
103 typedef tct_float const tct_coord2_type[2];
113 typedef tct_derivable_float2
const * tct_coord2_type;
200 template<
bool with_derivatives = false>
329 struct Texture_handler_base;
334 template<
bool with_derivatives = false>
339 void (*m_tex_lookup_float4_2d)(
343 typename traits::tct_coord2_type coord,
351 void (*m_tex_lookup_float3_2d)(
355 typename traits::tct_coord2_type coord,
363 void (*m_tex_texel_float4_2d)(
372 void (*m_tex_lookup_float4_3d)(
386 void (*m_tex_lookup_float3_3d)(
400 void (*m_tex_texel_float4_3d)(
408 void (*m_tex_lookup_float4_cube)(
415 void (*m_tex_lookup_float3_cube)(
424 void (*m_tex_resolution_2d)(
434 void (*m_tex_resolution_3d)(
474 void (*m_df_light_profile_sample)(
496 void (*m_df_bsdf_measurement_resolution)(
503 void (*m_df_bsdf_measurement_evaluate)(
512 void (*m_df_bsdf_measurement_sample)(
530 void (*m_df_bsdf_measurement_albedos)(
542 void (*m_adapt_normal)(
563 void (*m_scene_data_lookup_float2)(
572 void (*m_scene_data_lookup_float3)(
581 void (*m_scene_data_lookup_float4)(
598 void (*m_scene_data_lookup_int2)(
603 tct_int const default_value[2],
607 void (*m_scene_data_lookup_int3)(
612 tct_int const default_value[3],
616 void (*m_scene_data_lookup_int4)(
621 tct_int const default_value[4],
625 void (*m_scene_data_lookup_color)(
639 void (*m_scene_data_lookup_deriv_float)(
648 void (*m_scene_data_lookup_deriv_float2)(
657 void (*m_scene_data_lookup_deriv_float3)(
666 void (*m_scene_data_lookup_deriv_float4)(
675 void (*m_scene_data_lookup_deriv_color)(
718 BSDF_EVENT_ABSORB = 0,
720 BSDF_EVENT_DIFFUSE = 1,
721 BSDF_EVENT_GLOSSY = 1 << 1,
722 BSDF_EVENT_SPECULAR = 1 << 2,
723 BSDF_EVENT_REFLECTION = 1 << 3,
724 BSDF_EVENT_TRANSMISSION = 1 << 4,
726 BSDF_EVENT_DIFFUSE_REFLECTION = BSDF_EVENT_DIFFUSE | BSDF_EVENT_REFLECTION,
727 BSDF_EVENT_DIFFUSE_TRANSMISSION = BSDF_EVENT_DIFFUSE | BSDF_EVENT_TRANSMISSION,
728 BSDF_EVENT_GLOSSY_REFLECTION = BSDF_EVENT_GLOSSY | BSDF_EVENT_REFLECTION,
729 BSDF_EVENT_GLOSSY_TRANSMISSION = BSDF_EVENT_GLOSSY | BSDF_EVENT_TRANSMISSION,
730 BSDF_EVENT_SPECULAR_REFLECTION = BSDF_EVENT_SPECULAR | BSDF_EVENT_REFLECTION,
731 BSDF_EVENT_SPECULAR_TRANSMISSION = BSDF_EVENT_SPECULAR | BSDF_EVENT_TRANSMISSION,
733 BSDF_EVENT_FORCE_32_BIT = 0xffffffffU
739 #define MI_NEURAYLIB_BSDF_USE_MATERIAL_IOR (-1.0f)
769 template<Df_handle_slot_mode N>
778 tct_float3 bsdf_diffuse[
static_cast<size_t>(N)];
780 tct_float3 bsdf_glossy[
static_cast<size_t>(N)];
787 struct Bsdf_evaluate_data<
DF_HSM_POINTER> :
public Bsdf_evaluate_data_base
803 struct Bsdf_evaluate_data<
DF_HSM_NONE> :
public Bsdf_evaluate_data_base
828 template<Df_handle_slot_mode N>
843 struct Bsdf_auxiliary_data<
DF_HSM_POINTER> :
public Bsdf_auxiliary_data_base
858 struct Bsdf_auxiliary_data<
DF_HSM_NONE> :
public Bsdf_auxiliary_data_base
883 void const *exception_state,
884 char const *arg_block_data);
900 void const *exception_state,
901 char const *arg_block_data);
917 void const *exception_state,
918 char const *arg_block_data);
936 void const *exception_state,
937 char const *arg_block_data);
955 void const *exception_state,
956 char const *arg_block_data);
972 void const *exception_state,
973 char const *arg_block_data);
989 void const *exception_state,
990 char const *arg_block_data);
1006 void const *exception_state,
1007 char const *arg_block_data);
1023 void const *exception_state,
1024 char const *arg_block_data);
1040 void const *exception_state,
1041 char const *arg_block_data);
1057 void const *exception_state,
1058 char const *arg_block_data);
1073 void const *exception_state,
1074 char const *arg_block_data);
1090 void const *exception_state,
1091 char const *arg_block_data);
1097 EDF_EVENT_EMISSION = 1,
1099 EDF_EVENT_FORCE_32_BIT = 0xffffffffU
1117 template<Df_handle_slot_mode N>
1129 struct Edf_evaluate_data<
DF_HSM_POINTER> :
public Edf_evaluate_data_base
1141 struct Edf_evaluate_data<
DF_HSM_NONE> :
public Edf_evaluate_data_base
1159 template<Df_handle_slot_mode N>
1169 struct Edf_auxiliary_data<
DF_HSM_POINTER> :
public Edf_auxiliary_data_base
1180 struct Edf_auxiliary_data<
DF_HSM_NONE> :
public Edf_auxiliary_data_base
1202 void const *exception_state,
1203 char const *arg_block_data);
1221 void const *exception_state,
1222 char const *arg_block_data);
1238 void const *exception_state,
1239 char const *arg_block_data);
1255 void const *exception_state,
1256 char const *arg_block_data);
1272 void const *exception_state,
1273 char const *arg_block_data);
1289 void const *exception_state,
1290 char const *arg_block_data);
1306 void const *exception_state,
1307 char const *arg_block_data);
1323 void const *exception_state,
1324 char const *arg_block_data);
1339 void const *exception_state,
1340 char const *arg_block_data);
1356 void const *exception_state,
1357 char const *arg_block_data);
1365 #endif // MI_NEURAYLIB_TARGET_CODE_TYPES_H