|
Blender V5.3
|
#include "kernel/camera/camera.h"#include "kernel/geom/attribute.h"#include "kernel/geom/curve.h"#include "kernel/geom/gsplat.h"#include "kernel/geom/motion_triangle.h"#include "kernel/geom/object.h"#include "kernel/geom/point.h"#include "kernel/geom/primitive.h"#include "kernel/geom/triangle.h"#include "kernel/image.h"#include "kernel/osl/strings.h"#include "kernel/util/differential.h"#include "kernel/util/ies.h"#include "kernel/util/image_2d.h"#include "kernel/util/image_3d.h"#include "util/hash.h"#include "kernel/svm/ao.h"#include "kernel/svm/bevel.h"Go to the source code of this file.
Macros | |
| #define | READ_PATH_STATE(elem) |
| #define READ_PATH_STATE | ( | elem | ) |
Referenced by osl_shared_get_background_attribute().
| ccl_device bool attribute_bump_map_normal | ( | KernelGlobals | kg, |
| ccl_private const ShaderData * | sd, | ||
| ccl_private dual3 & | f ) |
Definition at line 558 of file services_shared.h.
References attribute_bump_map_normal(), ccl_device, ccl_private, kernel_assert, motion_triangle_smooth_normal(), object_inverse_normal_transform(), PRIMITIVE_MOTION_TRIANGLE, PRIMITIVE_TRIANGLE, SD_OBJECT_TRANSFORM_APPLIED, SHADER_SMOOTH_NORMAL, SR_BACKFACING, and triangle_smooth_normal().
Referenced by attribute_bump_map_normal(), and osl_shared_get_object_standard_attribute().
| ccl_device_forceinline void copy_matrix | ( | ccl_private float * | res, |
| const ProjectionTransform & | tfm ) |
Definition at line 213 of file services_shared.h.
References ccl_device_forceinline, ccl_private, copy_matrix(), float4::w, ProjectionTransform::w, float4::x, ProjectionTransform::x, float4::y, ProjectionTransform::y, float4::z, and ProjectionTransform::z.
| ccl_device_forceinline void copy_matrix | ( | ccl_private float * | res, |
| const Transform & | tfm ) |
Definition at line 193 of file services_shared.h.
References ccl_device_forceinline, ccl_private, copy_matrix(), float4::w, float4::x, Transform::x, float4::y, Transform::y, float4::z, and Transform::z.
Referenced by copy_matrix(), copy_matrix(), osl_get_inverse_matrix(), osl_get_matrix(), osl_shared_get_named_inverse_matrix(), osl_shared_get_named_matrix(), osl_shared_get_object_inverse_matrix(), osl_shared_get_object_inverse_matrix_motion(), osl_shared_get_object_matrix(), osl_shared_get_object_matrix_motion(), and set_attribute_matrix().
| ccl_device_forceinline float4 get_missingcolor | ( | const float * | missingcolor, |
| const int | nchannels ) |
Definition at line 620 of file services_shared.h.
References ccl_device_forceinline, get_missingcolor(), IMAGE_MISSING_RGBA, and zero_float4().
Referenced by get_missingcolor(), osl_shared_environment(), and osl_shared_texture().
| CCL_NAMESPACE_BEGIN ccl_device_inline bool is_type_float2 | ( | const TypeDesc | t | ) |
Definition at line 111 of file services_shared.h.
References ccl_device_inline, and is_type_float2().
Referenced by is_type_float2(), and osl_shared_get_texture_info().
| ccl_device_inline bool is_type_float3 | ( | const TypeDesc | t | ) |
Definition at line 117 of file services_shared.h.
References ccl_device_inline, and is_type_float3().
Referenced by is_type_float3(), osl_shared_get_texture_info(), set_attribute(), set_attribute(), set_attribute(), set_attribute(), and set_attribute().
| ccl_device_inline bool is_type_float4 | ( | const TypeDesc | t | ) |
Definition at line 123 of file services_shared.h.
References ccl_device_inline, and is_type_float4().
Referenced by is_type_float4(), osl_shared_get_texture_info(), set_attribute(), set_attribute(), set_attribute(), set_attribute(), and set_attribute().
| ccl_device_inline bool is_type_int2 | ( | const TypeDesc | t | ) |
Definition at line 129 of file services_shared.h.
References ccl_device_inline, and is_type_int2().
Referenced by is_type_int2(), and osl_shared_get_texture_info().
| ccl_device_inline bool is_type_int3 | ( | const TypeDesc | t | ) |
Definition at line 135 of file services_shared.h.
References ccl_device_inline, and is_type_int3().
Referenced by is_type_int3(), and osl_shared_get_texture_info().
| ccl_device_forceinline void missingcolor_to_nchannels | ( | const float * | missingcolor, |
| const int | nchannels, | ||
| ccl_private float * | result ) |
Definition at line 641 of file services_shared.h.
References ccl_device_forceinline, ccl_private, and missingcolor_to_nchannels().
Referenced by missingcolor_to_nchannels(), osl_shared_environment(), and osl_shared_texture().
| ccl_device bool osl_shared_environment | ( | KernelGlobals | kg, |
| ccl_private ShaderGlobals * | sg, | ||
| ccl_private void * | texture_handle, | ||
| ccl_private OSLTextureOptions * | opt, | ||
| float3 | R, | ||
| float3 | dRdx, | ||
| float3 | dRdy, | ||
| int | nchannels, | ||
| float * | result ) |
Definition at line 907 of file services_shared.h.
References ccl_device, ccl_private, direction_to_equirectangular(), get_missingcolor(), IMAGE, IMAGE_MISSING_RGBA, kernel_image_interp_with_udim(), missingcolor_to_nchannels(), osl_shared_environment(), OSL_TEXTURE_HANDLE_ID, OSL_TEXTURE_HANDLE_TYPE, R, rgba_to_nchannels(), and dual< float3 >::val.
Referenced by OSLRenderServices::environment(), osl_shared_environment(), and rs_environment().
| ccl_device_inline bool osl_shared_get_background_attribute | ( | KernelGlobals | kg, |
| ccl_private ShaderGlobals * | sg, | ||
| ccl_private ShaderData * | sd, | ||
| DeviceString | name, | ||
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 1017 of file services_shared.h.
References CAMERA_ORTHOGRAPHIC, camera_world_to_ndc(), ccl_device_inline, ccl_private, differential_from_compact(), differential3::dx, dual< float3 >::dx, differential3::dy, dual< float3 >::dy, kernel_data, OBJECT_NONE, OSL_RAYTYPE_TO_PARTIAL_PATH_FLAG, OSL_RAYTYPE_TO_VISIBILITY, osl_shared_get_background_attribute(), osl_shared_get_scene_attribute(), PATH_RAY_EMISSION, PATH_RAY_VISIBILITY_CAMERA, PATH_RAY_VISIBILITY_SHADOW, READ_PATH_STATE, set_attribute(), state, and dual< float3 >::val.
Referenced by OSLRenderServices::get_background_attribute(), osl_shared_get_background_attribute(), and osl_shared_get_object_standard_attribute().
| ccl_device_inline bool osl_shared_get_camera_attribute | ( | KernelGlobals | kg, |
| ccl_private ShaderGlobals * | sg, | ||
| DeviceString | name, | ||
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 1315 of file services_shared.h.
References camera_sample_aperture(), ccl_device_inline, ccl_private, image, kernel_data, make_float2, osl_shared_get_camera_attribute(), osl_shared_get_scene_attribute(), and set_attribute().
Referenced by OSLRenderServices::get_attribute(), OSLRenderServices::get_camera_attribute(), osl_get_attribute(), and osl_shared_get_camera_attribute().
| ccl_device_inline bool osl_shared_get_named_inverse_matrix | ( | KernelGlobals | kg, |
| DeviceString | to, | ||
| ccl_private float * | res ) |
Definition at line 334 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_matrix(), kernel_data, osl_shared_get_named_inverse_matrix(), and projection_identity().
Referenced by OSLRenderServices::get_inverse_matrix(), OSLRenderServices::get_inverse_matrix(), osl_get_inverse_matrix(), and osl_shared_get_named_inverse_matrix().
| ccl_device_inline bool osl_shared_get_named_matrix | ( | KernelGlobals | kg, |
| DeviceString | from, | ||
| ccl_private float * | res ) |
Definition at line 307 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_matrix(), kernel_data, osl_shared_get_named_matrix(), and projection_identity().
Referenced by OSLRenderServices::get_matrix(), OSLRenderServices::get_matrix(), osl_get_matrix(), and osl_shared_get_named_matrix().
| ccl_device_inline bool osl_shared_get_object_attribute | ( | KernelGlobals | kg, |
| ccl_private ShaderData * | sd, | ||
| const AttributeDescriptor & | desc, | ||
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 986 of file services_shared.h.
References ccl_device_inline, ccl_private, NODE_ATTR_FLOAT, NODE_ATTR_FLOAT2, NODE_ATTR_FLOAT3, NODE_ATTR_FLOAT4, NODE_ATTR_MATRIX, NODE_ATTR_QUATERNION, NODE_ATTR_RGBA, osl_shared_get_object_attribute(), osl_shared_get_object_attribute_impl(), primitive_attribute_matrix(), set_attribute_matrix(), and AttributeDescriptor::type.
Referenced by OSLRenderServices::get_attribute(), osl_get_attribute(), osl_shared_get_object_attribute(), and osl_shared_get_object_standard_attribute().
| ccl_device_inline bool osl_shared_get_object_attribute_impl | ( | KernelGlobals | kg, |
| ccl_private ShaderData * | sd, | ||
| const AttributeDescriptor & | desc, | ||
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 961 of file services_shared.h.
References ccl_device_inline, ccl_private, dual< T >::dual(), osl_shared_get_object_attribute_impl(), primitive_surface_attribute(), and set_attribute().
Referenced by osl_shared_get_object_attribute(), and osl_shared_get_object_attribute_impl().
| ccl_device_inline bool osl_shared_get_object_inverse_matrix | ( | KernelGlobals | kg, |
| ccl_private const ShaderData * | sd, | ||
| ccl_private float * | res ) |
Definition at line 272 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_matrix(), object_get_inverse_transform(), OBJECT_NONE, and osl_shared_get_object_inverse_matrix().
Referenced by OSLRenderServices::get_inverse_matrix(), osl_get_inverse_matrix(), and osl_shared_get_object_inverse_matrix().
| ccl_device_inline bool osl_shared_get_object_inverse_matrix_motion | ( | KernelGlobals | kg, |
| ccl_private const ShaderData * | sd, | ||
| ccl_private float * | res, | ||
| float | time ) |
Definition at line 285 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_matrix(), object_fetch_transform_motion_test(), object_get_inverse_transform(), OBJECT_NONE, and osl_shared_get_object_inverse_matrix_motion().
Referenced by OSLRenderServices::get_inverse_matrix(), and osl_shared_get_object_inverse_matrix_motion().
| ccl_device_inline bool osl_shared_get_object_matrix | ( | KernelGlobals | kg, |
| ccl_private const ShaderData * | sd, | ||
| ccl_private float * | res ) |
Definition at line 235 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_matrix(), object_get_transform(), OBJECT_NONE, and osl_shared_get_object_matrix().
Referenced by OSLRenderServices::get_matrix(), osl_get_matrix(), and osl_shared_get_object_matrix().
| ccl_device_inline bool osl_shared_get_object_matrix_motion | ( | KernelGlobals | kg, |
| ccl_private const ShaderData * | sd, | ||
| ccl_private float * | res, | ||
| float | time ) |
Definition at line 248 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_matrix(), object_fetch_transform_motion_test(), object_get_transform(), OBJECT_NONE, and osl_shared_get_object_matrix_motion().
Referenced by OSLRenderServices::get_matrix(), and osl_shared_get_object_matrix_motion().
| ccl_device_inline bool osl_shared_get_object_standard_attribute | ( | KernelGlobals | kg, |
| ccl_private ShaderGlobals * | sg, | ||
| ccl_private ShaderData * | sd, | ||
| DeviceString | name, | ||
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 1116 of file services_shared.h.
References ATTR_STD_NORMAL_UNDISPLACED, attribute_bump_map_normal(), ccl_device_inline, ccl_private, find_attribute(), hash_uint2_to_float(), is_attribute_found(), motion_triangle_vertices(), object_alpha(), object_color(), object_dupli_generated(), object_dupli_uv(), object_location(), object_particle_id(), object_pass_id(), object_position_transform(), object_random_number(), osl_shared_get_background_attribute(), osl_shared_get_object_attribute(), osl_shared_get_object_standard_attribute(), P, particle_age(), particle_angular_velocity(), particle_index(), particle_lifetime(), particle_location(), particle_rotation(), particle_size(), particle_velocity(), PRIMITIVE_ANY_POINT, PRIMITIVE_CURVE, PRIMITIVE_GSPLAT, PRIMITIVE_LAMP, PRIMITIVE_MOTION, PRIMITIVE_TRIANGLE, SD_OBJECT_TRANSFORM_APPLIED, set_attribute(), set_attribute_float3_3(), shader_pass_id(), SHADER_SMOOTH_NORMAL, triangle_smooth_normal_unnormalized_object_space(), and triangle_vertices().
Referenced by OSLRenderServices::get_attribute(), OSLRenderServices::get_object_standard_attribute(), osl_get_attribute(), and osl_shared_get_object_standard_attribute().
| ccl_device_inline bool osl_shared_get_scene_attribute | ( | KernelGlobals | kg, |
| DeviceString | name, | ||
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 943 of file services_shared.h.
References ccl_device_inline, ccl_private, kernel_data, osl_shared_get_scene_attribute(), and set_attribute().
Referenced by osl_shared_get_background_attribute(), osl_shared_get_camera_attribute(), and osl_shared_get_scene_attribute().
| ccl_device bool osl_shared_get_texture_info | ( | KernelGlobals | kg, |
| ccl_private void * | texture_handle, | ||
| const float2 | uv, | ||
| const bool | use_uv, | ||
| DeviceString | dataname, | ||
| const TypeDesc | datatype, | ||
| void * | data ) |
Definition at line 659 of file services_shared.h.
References ccl_device, ccl_global, ccl_private, float, IMAGE, IMAGE_DATA_TYPE_BYTE, IMAGE_DATA_TYPE_BYTE4, IMAGE_DATA_TYPE_FLOAT, IMAGE_DATA_TYPE_FLOAT4, IMAGE_DATA_TYPE_HALF, IMAGE_DATA_TYPE_HALF4, IMAGE_DATA_TYPE_NANOVDB_EMPTY, IMAGE_DATA_TYPE_NANOVDB_FLOAT, IMAGE_DATA_TYPE_NANOVDB_FLOAT3, IMAGE_DATA_TYPE_NANOVDB_FLOAT4, IMAGE_DATA_TYPE_NANOVDB_FP16, IMAGE_DATA_TYPE_NANOVDB_FPN, IMAGE_DATA_TYPE_USHORT, IMAGE_DATA_TYPE_USHORT4, is_type_float2(), is_type_float3(), is_type_float4(), is_type_int2(), is_type_int3(), kernel_data_fetch, KERNEL_IMAGE_NONE, kernel_image_udim_map(), osl_shared_get_texture_info(), OSL_TEXTURE_HANDLE_ID, and OSL_TEXTURE_HANDLE_TYPE.
Referenced by OSLRenderServices::get_texture_info(), OSLRenderServices::get_texture_info(), osl_shared_get_texture_info(), rs_get_texture_info(), and rs_get_texture_info_st().
| ccl_device bool osl_shared_texture | ( | KernelGlobals | kg, |
| ccl_private ShaderGlobals * | sg, | ||
| ccl_private void * | texture_handle, | ||
| ccl_private OSLTextureOptions * | opt, | ||
| float | s, | ||
| float | t, | ||
| float | dsdx, | ||
| float | dtdx, | ||
| float | dsdy, | ||
| float | dtdy, | ||
| int | nchannels, | ||
| float * | result ) |
Definition at line 771 of file services_shared.h.
References AO, BEVEL, ccl_device, ccl_private, get_missingcolor(), IES, IMAGE, IMAGE_MISSING_RGBA, kernel_ies_interp(), kernel_image_interp_with_udim(), make_float3(), missingcolor_to_nchannels(), N, NODE_AO_GLOBAL_RADIUS, NODE_AO_INSIDE, NODE_AO_ONLY_LOCAL, osl_shared_texture(), OSL_TEXTURE_HANDLE_ID, OSL_TEXTURE_HANDLE_TYPE, rgba_to_nchannels(), and state.
Referenced by osl_shared_texture(), rs_texture(), and OSLRenderServices::texture().
| ccl_device bool osl_shared_texture3d | ( | KernelGlobals | kg, |
| ccl_private ShaderGlobals * | sg, | ||
| ccl_private void * | texture_handle, | ||
| float3 | P, | ||
| float3 | , | ||
| float3 | , | ||
| float3 | , | ||
| int | nchannels, | ||
| float * | result ) |
Definition at line 872 of file services_shared.h.
References ccl_device, ccl_private, IMAGE, IMAGE_MISSING_RGBA, INTERPOLATION_NONE, osl_shared_texture3d(), OSL_TEXTURE_HANDLE_ID, OSL_TEXTURE_HANDLE_TYPE, P, and rgba_to_nchannels().
Referenced by osl_shared_texture3d(), rs_texture3d(), and OSLRenderServices::texture3d().
| ccl_device_forceinline void rgba_to_nchannels | ( | const float4 | rgba, |
| const int | nchannels, | ||
| ccl_private float * | result ) |
Definition at line 602 of file services_shared.h.
References ccl_device_forceinline, ccl_private, rgba_to_nchannels(), float4::w, float4::x, float4::y, and float4::z.
Referenced by osl_shared_environment(), osl_shared_texture(), osl_shared_texture3d(), and rgba_to_nchannels().
| ccl_device_template_spec bool set_attribute | ( | const dual1 | v, |
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 363 of file services_shared.h.
References ccl_device_template_spec, ccl_private, is_type_float3(), is_type_float4(), make_float3(), make_float4, set_attribute(), set_data_float(), set_data_float3(), and set_data_float4().
| ccl_device_template_spec bool set_attribute | ( | const dual2 | v, |
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 384 of file services_shared.h.
References average(), ccl_device_template_spec, ccl_private, is_type_float3(), is_type_float4(), make_float3(), make_float4, set_attribute(), set_data_float(), set_data_float3(), and set_data_float4().
| ccl_device_template_spec bool set_attribute | ( | const dual3 | v, |
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 405 of file services_shared.h.
References average(), ccl_device_template_spec, ccl_private, is_type_float3(), is_type_float4(), make_float4, set_attribute(), set_data_float(), set_data_float3(), and set_data_float4().
| ccl_device_template_spec bool set_attribute | ( | const dual4 | v, |
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 426 of file services_shared.h.
References average(), ccl_device_template_spec, ccl_private, is_type_float3(), is_type_float4(), make_float3(), set_attribute(), set_data_float(), set_data_float3(), and set_data_float4().
| ccl_device_template_spec bool set_attribute | ( | const dual< Quaternion > | v, |
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 446 of file services_shared.h.
References average(), ccl_device_template_spec, ccl_private, is_type_float3(), is_type_float4(), make_float3(), set_attribute(), set_data_float(), set_data_float3(), and set_data_quaternion().
| ccl_device_inline bool set_attribute | ( | const dual< T > | v, |
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
References ccl_device_inline, ccl_private, and set_attribute().
Referenced by OSLRenderServices::getmessage(), osl_shared_get_background_attribute(), osl_shared_get_camera_attribute(), osl_shared_get_object_attribute_impl(), osl_shared_get_object_standard_attribute(), osl_shared_get_scene_attribute(), set_attribute(), set_attribute(), set_attribute(), set_attribute(), set_attribute(), set_attribute(), set_attribute(), set_attribute(), and set_attribute().
| ccl_device_template_spec bool set_attribute | ( | const int | i, |
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 475 of file services_shared.h.
References ccl_device_template_spec, ccl_private, and set_attribute().
| ccl_device_inline bool set_attribute | ( | const T | f, |
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 467 of file services_shared.h.
References ccl_device_inline, ccl_private, set_attribute(), and T.
| ccl_device_template_spec bool set_attribute | ( | ustring | str, |
| const TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 496 of file services_shared.h.
References ccl_device_template_spec, ccl_private, set_attribute(), and str.
| ccl_device_inline bool set_attribute_float3_3 | ( | const float3 | P[3], |
| TypeDesc | type, | ||
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 529 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_v3_v3(), P, and set_attribute_float3_3().
Referenced by osl_shared_get_object_standard_attribute(), and set_attribute_float3_3().
| ccl_device_inline bool set_attribute_matrix | ( | const Transform & | tfm, |
| const TypeDesc | type, | ||
| ccl_private void * | val ) |
Definition at line 517 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_matrix(), and set_attribute_matrix().
Referenced by osl_shared_get_object_attribute(), and set_attribute_matrix().
| ccl_device_inline void set_data_float | ( | const dual1 | data, |
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 149 of file services_shared.h.
References ccl_device_inline, ccl_private, and set_data_float().
Referenced by set_attribute(), set_attribute(), set_attribute(), set_attribute(), set_attribute(), and set_data_float().
| ccl_device_inline void set_data_float3 | ( | const dual3 | data, |
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 159 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_v3_v3(), and set_data_float3().
Referenced by set_attribute(), set_attribute(), set_attribute(), set_attribute(), set_attribute(), and set_data_float3().
| ccl_device_inline void set_data_float4 | ( | const dual4 | data, |
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 169 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_v4_v4(), and set_data_float4().
Referenced by set_attribute(), set_attribute(), set_attribute(), set_attribute(), and set_data_float4().
| ccl_device_inline void set_data_quaternion | ( | const dual< Quaternion > | data, |
| bool | derivatives, | ||
| ccl_private void * | val ) |
Definition at line 179 of file services_shared.h.
References ccl_device_inline, ccl_private, copy_v4_qt(), and set_data_quaternion().
Referenced by set_attribute(), and set_data_quaternion().