|
Blender V5.0
|
#include <services.h>
Inherits OSL::RendererServices.
Public Member Functions | |
| OSLRenderServices (OSL::TextureSystem *texture_system, const int device_type) | |
| ~OSLRenderServices () override | |
| int | supports (string_view feature) const override |
| bool | get_matrix (OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform, float time) override |
| bool | get_inverse_matrix (OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform, float time) override |
| bool | get_matrix (OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSLUStringHash from, float time) override |
| bool | get_inverse_matrix (OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSLUStringHash to, float time) override |
| bool | get_matrix (OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform) override |
| bool | get_inverse_matrix (OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform) override |
| bool | get_matrix (OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSLUStringHash from) override |
| bool | get_inverse_matrix (OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSLUStringHash to) override |
| bool | get_array_attribute (OSL::ShaderGlobals *sg, bool derivatives, OSLUStringHash object, const TypeDesc type, OSLUStringHash name, const int index, void *val) override |
| bool | get_attribute (OSL::ShaderGlobals *sg, bool derivatives, OSLUStringHash object, const TypeDesc type, OSLUStringHash name, void *val) override |
| bool | get_userdata (bool derivatives, OSLUStringHash name, const TypeDesc type, OSL::ShaderGlobals *sg, void *val) override |
| int | pointcloud_search (OSL::ShaderGlobals *sg, OSLUStringHash filename, const OSL::Vec3 ¢er, const float radius, const int max_points, bool sort, size_t *out_indices, float *out_distances, int derivs_offset) override |
| int | pointcloud_get (OSL::ShaderGlobals *sg, OSLUStringHash filename, size_t *indices, const int count, OSLUStringHash attr_name, const TypeDesc attr_type, void *out_data) override |
| bool | pointcloud_write (OSL::ShaderGlobals *sg, OSLUStringHash filename, const OSL::Vec3 &pos, const int nattribs, const OSLUStringRep *names, const TypeDesc *types, const void **data) override |
| bool | trace (TraceOpt &options, OSL::ShaderGlobals *sg, const OSL::Vec3 &P, const OSL::Vec3 &dPdx, const OSL::Vec3 &dPdy, const OSL::Vec3 &R, const OSL::Vec3 &dRdx, const OSL::Vec3 &dRdy) override |
| bool | getmessage (OSL::ShaderGlobals *sg, OSLUStringHash source, OSLUStringHash name, const TypeDesc type, void *val, bool derivatives) override |
| OSL::TextureSystem::TextureHandle * | get_texture_handle (OSL::ustring filename, OSL::ShadingContext *context, const OSL::TextureOpt *options) override |
| OSL::TextureSystem::TextureHandle * | get_texture_handle (OSLUStringHash filename, OSL::ShadingContext *context, const OSL::TextureOpt *options) override |
| bool | good (OSL::TextureSystem::TextureHandle *texture_handle) override |
| bool | texture (OSLUStringHash filename, OSL::TextureSystem::TextureHandle *texture_handle, TexturePerthread *texture_thread_info, OSL::TextureOpt &options, OSL::ShaderGlobals *sg, const float s, const float t, const float dsdx, const float dtdx, const float dsdy, const float dtdy, const int nchannels, float *result, float *dresultds, float *dresultdt, OSLUStringHash *errormessage) override |
| bool | texture3d (OSLUStringHash filename, TextureHandle *texture_handle, TexturePerthread *texture_thread_info, OSL::TextureOpt &options, OSL::ShaderGlobals *sg, const OSL::Vec3 &P, const OSL::Vec3 &dPdx, const OSL::Vec3 &dPdy, const OSL::Vec3 &dPdz, const int nchannels, float *result, float *dresultds, float *dresultdt, float *dresultdr, OSLUStringHash *errormessage) override |
| bool | environment (OSLUStringHash filename, TextureHandle *texture_handle, TexturePerthread *texture_thread_info, OSL::TextureOpt &options, OSL::ShaderGlobals *sg, const OSL::Vec3 &R, const OSL::Vec3 &dRdx, const OSL::Vec3 &dRdy, const int nchannels, float *result, float *dresultds, float *dresultdt, OSLUStringHash *errormessage) override |
| bool | get_texture_info (OSLUStringHash filename, TextureHandle *texture_handle, TexturePerthread *texture_thread_info, OSL::ShaderGlobals *sg, const int subimage, OSLUStringHash dataname, const TypeDesc datatype, void *data, OSLUStringHash *errormessage) override |
Static Public Member Functions | |
| static void | register_closures (OSL::ShadingSystem *ss) |
| static bool | get_background_attribute (ShaderGlobals *globals, OSLUStringHash name, const TypeDesc type, bool derivatives, void *val) |
| static bool | get_camera_attribute (ShaderGlobals *globals, OSLUStringHash name, TypeDesc type, bool derivatives, void *val) |
| static bool | get_object_standard_attribute (ShaderGlobals *globals, OSLUStringHash name, const TypeDesc type, bool derivatives, void *val) |
Public Attributes | |
| OSLTextureHandleMap | textures |
Static Public Attributes | |
| static ustring | u_distance |
| static ustring | u_index |
| static ustring | u_world |
| static ustring | u_camera |
| static ustring | u_screen |
| static ustring | u_raster |
| static ustring | u_ndc |
| static ustring | u_object_location |
| static ustring | u_object_color |
| static ustring | u_object_alpha |
| static ustring | u_object_index |
| static ustring | u_object_is_light |
| static ustring | u_bump_map_normal |
| static ustring | u_geom_dupli_generated |
| static ustring | u_geom_dupli_uv |
| static ustring | u_material_index |
| static ustring | u_object_random |
| static ustring | u_particle_index |
| static ustring | u_particle_random |
| static ustring | u_particle_age |
| static ustring | u_particle_lifetime |
| static ustring | u_particle_location |
| static ustring | u_particle_rotation |
| static ustring | u_particle_size |
| static ustring | u_particle_velocity |
| static ustring | u_particle_angular_velocity |
| static ustring | u_geom_numpolyvertices |
| static ustring | u_geom_trianglevertices |
| static ustring | u_geom_polyvertices |
| static ustring | u_geom_name |
| static ustring | u_geom_undisplaced |
| static ustring | u_is_smooth |
| static ustring | u_is_curve |
| static ustring | u_curve_thickness |
| static ustring | u_curve_length |
| static ustring | u_curve_tangent_normal |
| static ustring | u_curve_random |
| static ustring | u_is_point |
| static ustring | u_point_position |
| static ustring | u_point_radius |
| static ustring | u_point_random |
| static ustring | u_normal_map_normal |
| static ustring | u_path_ray_length |
| static ustring | u_path_ray_depth |
| static ustring | u_path_diffuse_depth |
| static ustring | u_path_glossy_depth |
| static ustring | u_path_transparent_depth |
| static ustring | u_path_transmission_depth |
| static ustring | u_path_portal_depth |
| static ustring | u_trace |
| static ustring | u_hit |
| static ustring | u_hitdist |
| static ustring | u_N |
| static ustring | u_Ng |
| static ustring | u_P |
| static ustring | u_I |
| static ustring | u_u |
| static ustring | u_v |
| static ustring | u_empty |
| static ustring | u_at_bevel |
| static ustring | u_at_ao |
| static ustring | u_sensor_size |
| static ustring | u_image_resolution |
| static ustring | u_aperture_aspect_ratio |
| static ustring | u_aperture_size |
| static ustring | u_aperture_position |
| static ustring | u_focal_distance |
| static ImageManager * | image_manager = nullptr |
Definition at line 75 of file services.h.
| OSLRenderServices::OSLRenderServices | ( | OSL::TextureSystem * | texture_system, |
| const int | device_type ) |
Definition at line 131 of file services.cpp.
|
override |
Definition at line 136 of file services.cpp.
References LOG_INFO.
|
override |
Definition at line 1374 of file services.cpp.
References ShaderGlobals::kg, OSLTextureHandle::oiio_handle, options, OSLTextureHandle::processor, R, result, status, ColorSpaceManager::to_scene_linear(), and to_ustring().
|
override |
Definition at line 402 of file services.cpp.
|
override |
Definition at line 930 of file services.cpp.
References ATTR_STD_NOT_FOUND, find_attribute(), get_camera_attribute(), get_object_attribute(), get_object_standard_attribute(), ShaderGlobals::kg, name, AttributeDescriptor::offset, ShaderGlobals::sd, and u_empty.
Referenced by getmessage().
|
static |
Definition at line 817 of file services.cpp.
References CAMERA_ORTHOGRAPHIC, camera_world_to_ndc(), differential_from_compact(), differential3::dx, dual< float3 >::dx, differential3::dy, dual< float3 >::dy, kernel_data, ShaderGlobals::kg, name, OBJECT_NONE, PATH_RAY_CAMERA, PATH_RAY_EMISSION, PATH_RAY_SHADOW, ShaderGlobals::path_state, ShaderGlobals::raytype, READ_PATH_STATE, ShaderGlobals::sd, set_attribute(), ShaderGlobals::shadow_path_state, state, u_ndc, u_path_diffuse_depth, u_path_glossy_depth, u_path_portal_depth, u_path_ray_depth, u_path_ray_length, u_path_transmission_depth, u_path_transparent_depth, and dual< float3 >::val.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 900 of file services.cpp.
References camera_sample_aperture(), kernel_data, ShaderGlobals::kg, make_float2, ShaderGlobals::N, name, pos, set_attribute(), u_aperture_aspect_ratio, u_aperture_position, u_aperture_size, u_focal_distance, u_image_resolution, u_sensor_size, packed_float3::x, and packed_float3::y.
Referenced by get_attribute().
|
override |
Definition at line 322 of file services.cpp.
References copy_matrix(), ShaderGlobals::kg, object_get_inverse_transform(), OBJECT_NONE, result, and ShaderGlobals::sd.
|
override |
Definition at line 194 of file services.cpp.
References copy_matrix(), ShaderGlobals::kg, object_fetch_transform_motion_test(), object_get_inverse_transform(), OBJECT_NONE, result, and ShaderGlobals::sd.
|
override |
Definition at line 375 of file services.cpp.
References copy_matrix(), kernel_data, ShaderGlobals::kg, result, u_camera, u_ndc, u_raster, and u_screen.
|
override |
Definition at line 264 of file services.cpp.
References copy_matrix(), kernel_data, ShaderGlobals::kg, result, u_camera, u_ndc, u_raster, u_screen, and u_world.
|
override |
Definition at line 296 of file services.cpp.
References copy_matrix(), ShaderGlobals::kg, object_get_transform(), OBJECT_NONE, result, and ShaderGlobals::sd.
|
override |
Definition at line 156 of file services.cpp.
References copy_matrix(), ShaderGlobals::kg, object_fetch_transform_motion_test(), object_get_transform(), OBJECT_NONE, result, and ShaderGlobals::sd.
|
override |
Definition at line 348 of file services.cpp.
References copy_matrix(), kernel_data, ShaderGlobals::kg, result, u_camera, u_ndc, u_raster, and u_screen.
|
override |
Definition at line 232 of file services.cpp.
References copy_matrix(), kernel_data, ShaderGlobals::kg, result, u_camera, u_ndc, u_raster, u_screen, and u_world.
|
static |
Definition at line 631 of file services.cpp.
References ATTR_STD_NORMAL_UNDISPLACED, ATTR_STD_NOT_FOUND, attribute_bump_map_normal(), find_attribute(), get_background_attribute(), get_object_attribute(), hash_uint2_to_float(), ShaderGlobals::kg, motion_triangle_vertices(), name, object_alpha(), object_color(), object_dupli_generated(), object_dupli_uv(), object_location(), object_particle_id(), object_pass_id(), object_position_transform(), object_random_number(), AttributeDescriptor::offset, P, particle_age(), particle_angular_velocity(), particle_index(), particle_lifetime(), particle_location(), particle_rotation(), particle_size(), particle_velocity(), PRIMITIVE_CURVE, PRIMITIVE_LAMP, PRIMITIVE_MOTION, PRIMITIVE_POINT, PRIMITIVE_TRIANGLE, ShaderGlobals::sd, SD_OBJECT_TRANSFORM_APPLIED, set_attribute(), set_attribute_float3_3(), shader_pass_id(), SHADER_SMOOTH_NORMAL, triangle_smooth_normal_unnormalized(), triangle_vertices(), u_bump_map_normal, u_curve_random, u_curve_tangent_normal, u_curve_thickness, u_geom_dupli_generated, u_geom_dupli_uv, u_geom_name, u_geom_numpolyvertices, u_geom_polyvertices, u_geom_trianglevertices, u_is_curve, u_is_point, u_is_smooth, u_material_index, u_normal_map_normal, u_object_alpha, u_object_color, u_object_index, u_object_is_light, u_object_location, u_object_random, u_particle_age, u_particle_angular_velocity, u_particle_index, u_particle_lifetime, u_particle_location, u_particle_random, u_particle_rotation, u_particle_size, u_particle_velocity, u_point_position, u_point_radius, and u_point_random.
Referenced by get_attribute().
|
override |
Definition at line 990 of file services.cpp.
References OSLTextureHandle::AO, OSLTextureHandle::BEVEL, DEVICE_CPU, ImageHandle::empty(), OSLTextureHandle::IES, image_manager, OSLTextureHandle::OIIO, OSL_TEXTURE_HANDLE_TYPE_AO_OR_BEVEL, OSL_TEXTURE_HANDLE_TYPE_IES, OSL_TEXTURE_HANDLE_TYPE_SVM, OSLTextureHandle::SVM, ImageHandle::svm_slot(), textures, and to_ustring().
Referenced by get_texture_handle().
|
override |
Definition at line 984 of file services.cpp.
References get_texture_handle(), and to_ustring().
|
override |
Definition at line 1432 of file services.cpp.
References data, OSLTextureHandle::OIIO, OSLTextureHandle::oiio_handle, to_ustring(), and OSLTextureHandle::type.
|
override |
Definition at line 975 of file services.cpp.
|
override |
Definition at line 1582 of file services.cpp.
References differential_from_compact(), differential3::dx, differential3::dy, get_attribute(), ShaderGlobals::kg, name, set_attribute(), shader_setup_from_ray(), ShaderGlobals::tracedata, u_empty, u_hit, u_hitdist, u_I, u_N, u_Ng, u_P, u_trace, u_u, and u_v.
|
override |
Definition at line 1069 of file services.cpp.
References OSLTextureHandle::oiio_handle.
|
override |
Definition at line 1484 of file services.cpp.
|
override |
Definition at line 1467 of file services.cpp.
|
override |
Definition at line 1500 of file services.cpp.
|
static |
Definition at line 68 of file closures.cpp.
References osl_closure_layer_params().
|
override |
Definition at line 143 of file services.cpp.
References DEVICE_OPTIX.
|
override |
Definition at line 1080 of file services.cpp.
References OSLTextureHandle::AO, OSLTextureHandle::BEVEL, OSLTextureHandle::IES, kernel_ies_interp(), kernel_tex_image_interp(), ShaderGlobals::kg, make_float3(), make_float4, N, NODE_AO_GLOBAL_RADIUS, NODE_AO_INSIDE, NODE_AO_ONLY_LOCAL, OSLTextureHandle::OIIO, OSLTextureHandle::oiio_handle, options, ShaderGlobals::path_state, OSLTextureHandle::processor, result, ShaderGlobals::sd, state, status, OSLTextureHandle::SVM, OSLTextureHandle::svm_slots, TEX_IMAGE_MISSING_A, TEX_IMAGE_MISSING_B, TEX_IMAGE_MISSING_G, TEX_IMAGE_MISSING_R, tile, ColorSpaceManager::to_scene_linear(), to_ustring(), OSLTextureHandle::type, int4::w, int4::x, int4::y, and int4::z.
|
override |
Definition at line 1262 of file services.cpp.
References OSLTextureHandle::AO, OSLTextureHandle::BEVEL, dPdx(), dPdy(), OSLTextureHandle::IES, INTERPOLATION_NONE, ShaderGlobals::kg, make_float3(), OSLTextureHandle::OIIO, OSLTextureHandle::oiio_handle, options, P, OSLTextureHandle::processor, result, ShaderGlobals::sd, status, OSLTextureHandle::SVM, OSLTextureHandle::svm_slots, ColorSpaceManager::to_scene_linear(), to_ustring(), and OSLTextureHandle::type.
|
override |
Definition at line 1511 of file services.cpp.
References BVH_LAYOUT_NONE, Ray::D, Ray::dD, differential_make_compact(), Ray::dP, dPdx(), dPdy(), differential3::dx, differential3::dy, FLT_MAX, kernel_data, ShaderGlobals::kg, RaySelfPrimitives::light_object, RaySelfPrimitives::light_prim, make_float3(), RaySelfPrimitives::object, OBJECT_NONE, options, P, Ray::P, PATH_RAY_ALL_VISIBILITY, PATH_RAY_SHADOW_OPAQUE, RaySelfPrimitives::prim, PRIM_NONE, R, scene_intersect(), ShaderGlobals::sd, Ray::self, Ray::time, Ray::tmax, Ray::tmin, and ShaderGlobals::tracedata.
|
static |
Definition at line 340 of file services.h.
Referenced by get_texture_handle().
| OSLTextureHandleMap OSLRenderServices::textures |
Definition at line 338 of file services.h.
Referenced by get_texture_handle().
|
static |
Definition at line 329 of file services.h.
Referenced by get_camera_attribute().
|
static |
Definition at line 331 of file services.h.
Referenced by get_camera_attribute().
|
static |
Definition at line 330 of file services.h.
Referenced by get_camera_attribute().
|
static |
Definition at line 324 of file services.h.
|
static |
Definition at line 323 of file services.h.
|
static |
Definition at line 276 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 267 of file services.h.
Referenced by get_inverse_matrix(), get_inverse_matrix(), get_matrix(), and get_matrix().
|
static |
Definition at line 298 of file services.h.
|
static |
Definition at line 300 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 299 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 297 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 264 of file services.h.
|
static |
Definition at line 322 of file services.h.
Referenced by get_attribute(), and getmessage().
|
static |
Definition at line 332 of file services.h.
Referenced by get_camera_attribute().
|
static |
Definition at line 277 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 278 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 293 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 290 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 292 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 291 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 294 of file services.h.
|
static |
Definition at line 314 of file services.h.
Referenced by getmessage().
|
static |
Definition at line 315 of file services.h.
Referenced by getmessage().
|
static |
Definition at line 319 of file services.h.
Referenced by getmessage().
|
static |
Definition at line 328 of file services.h.
Referenced by get_camera_attribute().
|
static |
Definition at line 265 of file services.h.
|
static |
Definition at line 296 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 301 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 295 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 279 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 316 of file services.h.
Referenced by getmessage().
|
static |
Definition at line 270 of file services.h.
Referenced by get_background_attribute(), get_inverse_matrix(), get_inverse_matrix(), get_matrix(), and get_matrix().
|
static |
Definition at line 317 of file services.h.
Referenced by getmessage().
|
static |
Definition at line 305 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 273 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 272 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 274 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 275 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 271 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 280 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 318 of file services.h.
Referenced by getmessage().
|
static |
Definition at line 283 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 289 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 281 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 284 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 285 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 282 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 286 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 287 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 288 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 308 of file services.h.
Referenced by get_background_attribute().
|
static |
Definition at line 309 of file services.h.
Referenced by get_background_attribute().
|
static |
Definition at line 312 of file services.h.
Referenced by get_background_attribute().
|
static |
Definition at line 307 of file services.h.
Referenced by get_background_attribute().
|
static |
Definition at line 306 of file services.h.
Referenced by get_background_attribute().
|
static |
Definition at line 311 of file services.h.
Referenced by get_background_attribute().
|
static |
Definition at line 310 of file services.h.
Referenced by get_background_attribute().
|
static |
Definition at line 302 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 303 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 304 of file services.h.
Referenced by get_object_standard_attribute().
|
static |
Definition at line 269 of file services.h.
Referenced by get_inverse_matrix(), get_inverse_matrix(), get_matrix(), and get_matrix().
|
static |
Definition at line 268 of file services.h.
Referenced by get_inverse_matrix(), get_inverse_matrix(), get_matrix(), and get_matrix().
|
static |
Definition at line 327 of file services.h.
Referenced by get_camera_attribute().
|
static |
Definition at line 313 of file services.h.
Referenced by getmessage().
|
static |
Definition at line 320 of file services.h.
Referenced by getmessage().
|
static |
Definition at line 321 of file services.h.
Referenced by getmessage().
|
static |
Definition at line 266 of file services.h.
Referenced by get_inverse_matrix(), and get_matrix().