15#include <OSL/oslclosure.h>
16#include <OSL/oslexec.h>
17#include <OSL/rendererservices.h>
19#include <OpenImageIO/unordered_map_concurrent.h>
82 int supports(string_view feature)
const override;
86 OSL::TransformationPtr xform,
90 OSL::TransformationPtr xform,
100 float time)
override;
104 OSL::TransformationPtr xform)
override;
107 OSL::TransformationPtr xform)
override;
131 OSL::ShaderGlobals *sg,
136 const OSL::Vec3 ¢er,
138 const int max_points,
140#
if OSL_LIBRARY_VERSION_CODE >= 11400
145 float *out_distances,
146 int derivs_offset)
override;
150#
if OSL_LIBRARY_VERSION_CODE >= 11400
158 const TypeDesc attr_type,
159 void *out_data)
override;
163 const OSL::Vec3 &
pos,
166 const TypeDesc *
types,
167 const void **
data)
override;
170 OSL::ShaderGlobals *sg,
172 const OSL::Vec3 &
dPdx,
173 const OSL::Vec3 &
dPdy,
175 const OSL::Vec3 &dRdx,
176 const OSL::Vec3 &dRdy)
override;
183 bool derivatives)
override;
186 OSL::ShadingContext *context,
187 const OSL::TextureOpt *
options)
override;
189 OSL::ShadingContext *context,
190 const OSL::TextureOpt *
options)
override;
192 bool good(OSL::TextureSystem::TextureHandle *texture_handle)
override;
195 OSL::TextureSystem::TextureHandle *texture_handle,
196 TexturePerthread *texture_thread_info,
198 OSL::ShaderGlobals *sg,
212 TextureHandle *texture_handle,
213 TexturePerthread *texture_thread_info,
215 OSL::ShaderGlobals *sg,
217 const OSL::Vec3 &
dPdx,
218 const OSL::Vec3 &
dPdy,
219 const OSL::Vec3 &dPdz,
228 TextureHandle *texture_handle,
229 TexturePerthread *texture_thread_info,
231 OSL::ShaderGlobals *sg,
233 const OSL::Vec3 &dRdx,
234 const OSL::Vec3 &dRdy,
242 TextureHandle *texture_handle,
243 TexturePerthread *texture_thread_info,
244 OSL::ShaderGlobals *sg,
247 const TypeDesc datatype,
BMesh const char void * data
static DBVT_INLINE btDbvtNode * sort(btDbvtNode *n, btDbvtNode *&r)
static ustring u_bump_map_normal
static ustring u_path_transmission_depth
static bool get_background_attribute(ShaderGlobals *globals, OSLUStringHash name, const TypeDesc type, bool derivatives, void *val)
static ustring u_particle_location
static ImageManager * image_manager
static ustring u_object_alpha
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 ustring u_sensor_size
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 get_inverse_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform, float time) override
static ustring u_curve_thickness
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
static ustring u_particle_index
static ustring u_point_position
static ustring u_point_radius
static ustring u_curve_tangent_normal
~OSLRenderServices() override
int supports(string_view feature) const override
static ustring u_image_resolution
static ustring u_path_diffuse_depth
static bool get_camera_attribute(ShaderGlobals *globals, OSLUStringHash name, TypeDesc type, bool derivatives, void *val)
static ustring u_normal_map_normal
bool get_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform, float time) override
static ustring u_curve_length
static ustring u_aperture_aspect_ratio
static ustring u_material_index
static ustring u_path_ray_depth
static ustring u_point_random
static ustring u_is_smooth
static ustring u_object_location
static ustring u_curve_random
static ustring u_particle_rotation
static ustring u_focal_distance
static ustring u_particle_velocity
static ustring u_particle_angular_velocity
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
static ustring u_path_glossy_depth
static bool get_object_standard_attribute(ShaderGlobals *globals, OSLUStringHash name, const TypeDesc type, bool derivatives, void *val)
static ustring u_geom_dupli_uv
static ustring u_aperture_size
static ustring u_geom_undisplaced
OSLTextureHandleMap textures
static ustring u_geom_numpolyvertices
static ustring u_object_random
static ustring u_at_bevel
static ustring u_path_ray_length
static void register_closures(OSL::ShadingSystem *ss)
static ustring u_path_portal_depth
static ustring u_object_is_light
static ustring u_particle_random
static ustring u_particle_age
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 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_array_attribute(OSL::ShaderGlobals *sg, bool derivatives, OSLUStringHash object, const TypeDesc type, OSLUStringHash name, const int index, void *val) override
static ustring u_object_index
bool get_attribute(OSL::ShaderGlobals *sg, bool derivatives, OSLUStringHash object, const TypeDesc type, OSLUStringHash name, void *val) override
static ustring u_is_point
static ustring u_path_transparent_depth
bool get_userdata(bool derivatives, OSLUStringHash name, const TypeDesc type, OSL::ShaderGlobals *sg, void *val) 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
static ustring u_particle_lifetime
static ustring u_is_curve
static ustring u_object_color
static ustring u_distance
static ustring u_aperture_position
static ustring u_geom_trianglevertices
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
static ustring u_geom_polyvertices
bool getmessage(OSL::ShaderGlobals *sg, OSLUStringHash source, OSLUStringHash name, const TypeDesc type, void *val, bool derivatives) override
static ustring u_particle_size
OSL::TextureSystem::TextureHandle * get_texture_handle(OSL::ustring filename, OSL::ShadingContext *context, const OSL::TextureOpt *options) override
static ustring u_geom_dupli_generated
OSLRenderServices(OSL::TextureSystem *texture_system, const int device_type)
bool good(OSL::TextureSystem::TextureHandle *texture_handle) override
static ustring u_geom_name
ccl_device_forceinline float3 dPdx(const ccl_private ShaderData *sd)
ccl_device_forceinline float3 dPdy(const ccl_private ShaderData *sd)
CCL_NAMESPACE_BEGIN struct Options options
#define CCL_NAMESPACE_END
OSL::ustringhash OSLUStringHash
OSL::ustringrep OSLUStringRep
OIIO::unordered_map_concurrent< OSLUStringHash, OSLTextureHandle > OSLTextureHandleMap
OSLTextureHandle(const ImageHandle &handle)
ColorSpaceProcessor * processor
OSLTextureHandle(Type type=OIIO, const int svm_slot=-1)
OSLTextureHandle(Type type, const vector< int4 > &svm_slots)
OSL::TextureSystem::TextureHandle * oiio_handle