5#ifndef __OSL_SERVICES_H__
6#define __OSL_SERVICES_H__
16#include <OSL/oslclosure.h>
17#include <OSL/oslexec.h>
18#include <OSL/rendererservices.h>
92 int supports(string_view feature)
const override;
96 OSL::TransformationPtr xform,
100 OSL::TransformationPtr xform,
101 float time)
override;
106 float time)
override;
110 float time)
override;
114 OSL::TransformationPtr xform)
override;
117 OSL::TransformationPtr xform)
override;
147 OSL::ShaderGlobals *sg,
152 const OSL::Vec3 ¢er,
156#
if OSL_LIBRARY_VERSION_CODE >= 11400
161 float *out_distances,
162 int derivs_offset)
override;
166#
if OSL_LIBRARY_VERSION_CODE >= 11400
174 void *out_data)
override;
178 const OSL::Vec3 &
pos,
182 const void **
data)
override;
185 OSL::ShaderGlobals *sg,
187 const OSL::Vec3 &dPdx,
188 const OSL::Vec3 &dPdy,
190 const OSL::Vec3 &dRdx,
191 const OSL::Vec3 &dRdy)
override;
198 bool derivatives)
override;
200#if OSL_LIBRARY_VERSION_CODE >= 11304
202 OSL::ShadingContext *context,
203 const TextureOpt *
options)
override;
205 OSL::ShadingContext *context,
206 const TextureOpt *
options)
override;
207#elif OSL_LIBRARY_VERSION_CODE >= 11100
209 OSL::ShadingContext *context)
override;
214 bool good(TextureSystem::TextureHandle *texture_handle)
override;
217 TextureSystem::TextureHandle *texture_handle,
218 TexturePerthread *texture_thread_info,
220 OSL::ShaderGlobals *sg,
234 TextureHandle *texture_handle,
235 TexturePerthread *texture_thread_info,
237 OSL::ShaderGlobals *sg,
239 const OSL::Vec3 &dPdx,
240 const OSL::Vec3 &dPdy,
241 const OSL::Vec3 &dPdz,
250 TextureHandle *texture_handle,
251 TexturePerthread *texture_thread_info,
253 OSL::ShaderGlobals *sg,
255 const OSL::Vec3 &dRdx,
256 const OSL::Vec3 &dRdy,
263#if OSL_LIBRARY_VERSION_CODE >= 11304
265 TextureHandle *texture_handle,
266 TexturePerthread *texture_thread_info,
267 OSL::ShaderGlobals *sg,
273#elif OSL_LIBRARY_VERSION_CODE >= 11100
275 TextureHandle *texture_handle,
276 TexturePerthread *texture_thread_info,
277 OSL::ShadingContext *shading_context,
286 TextureHandle *texture_handle,
290 void *
data)
override;
static DBVT_INLINE btDbvtNode * sort(btDbvtNode *n, btDbvtNode *&r)
static ustring u_path_transmission_depth
static ustring u_particle_location
static ImageManager * image_manager
static ustring u_object_alpha
bool get_inverse_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform, float time) override
static ustring u_curve_thickness
static ustring u_particle_index
bool get_array_attribute(OSL::ShaderGlobals *sg, bool derivatives, OSLUStringHash object, TypeDesc type, OSLUStringHash name, int index, void *val) override
static ustring u_point_position
static ustring u_point_radius
static ustring u_curve_tangent_normal
int supports(string_view feature) const override
static ustring u_path_diffuse_depth
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
bool get_userdata(bool derivatives, OSLUStringHash name, TypeDesc type, OSL::ShaderGlobals *sg, void *val) override
static ustring u_material_index
static ustring u_path_ray_depth
static ustring u_point_random
bool getmessage(OSL::ShaderGlobals *sg, OSLUStringHash source, OSLUStringHash name, TypeDesc type, void *val, bool derivatives) override
static bool get_object_standard_attribute(const KernelGlobalsCPU *kg, ShaderData *sd, OSLUStringHash name, TypeDesc type, bool derivatives, void *val)
static ustring u_is_smooth
static bool get_background_attribute(const KernelGlobalsCPU *kg, ShaderData *sd, OSLUStringHash name, TypeDesc type, bool derivatives, void *val)
static ustring u_object_location
static ustring u_curve_random
bool texture3d(OSLUStringHash filename, TextureHandle *texture_handle, TexturePerthread *texture_thread_info, TextureOpt &options, OSL::ShaderGlobals *sg, const OSL::Vec3 &P, const OSL::Vec3 &dPdx, const OSL::Vec3 &dPdy, const OSL::Vec3 &dPdz, int nchannels, float *result, float *dresultds, float *dresultdt, float *dresultdr, OSLUStringHash *errormessage) override
static ustring u_particle_rotation
OSLRenderServices(OSL::TextureSystem *texture_system, int device_type)
static ustring u_particle_velocity
static ustring u_particle_angular_velocity
static ustring u_path_glossy_depth
static ustring u_geom_dupli_uv
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
bool get_texture_info(OSL::ShaderGlobals *sg, OSLUStringHash filename, TextureHandle *texture_handle, int subimage, OSLUStringHash dataname, TypeDesc datatype, void *data) override
static void register_closures(OSL::ShadingSystem *ss)
static ustring u_object_is_light
int pointcloud_get(OSL::ShaderGlobals *sg, OSLUStringHash filename, size_t *indices, int count, OSLUStringHash attr_name, TypeDesc attr_type, void *out_data) override
static ustring u_particle_random
static ustring u_particle_age
static ustring u_object_index
static ustring u_is_point
static ustring u_path_transparent_depth
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
bool environment(OSLUStringHash filename, TextureHandle *texture_handle, TexturePerthread *texture_thread_info, TextureOpt &options, OSL::ShaderGlobals *sg, const OSL::Vec3 &R, const OSL::Vec3 &dRdx, const OSL::Vec3 &dRdy, int nchannels, float *result, float *dresultds, float *dresultdt, OSLUStringHash *errormessage) override
static ustring u_is_curve
static ustring u_object_color
static ustring u_distance
static ustring u_geom_trianglevertices
int pointcloud_search(OSL::ShaderGlobals *sg, OSLUStringHash filename, const OSL::Vec3 ¢er, float radius, int max_points, bool sort, size_t *out_indices, float *out_distances, int derivs_offset) override
static ustring u_geom_polyvertices
TextureSystem::TextureHandle * get_texture_handle(OSLUStringHash filename) override
static ustring u_particle_size
bool pointcloud_write(OSL::ShaderGlobals *sg, OSLUStringHash filename, const OSL::Vec3 &pos, int nattribs, const OSLUStringRep *names, const TypeDesc *types, const void **data) override
static ustring u_geom_dupli_generated
bool good(TextureSystem::TextureHandle *texture_handle) override
bool get_attribute(OSL::ShaderGlobals *sg, bool derivatives, OSLUStringHash object, TypeDesc type, OSLUStringHash name, void *val) override
static ustring u_geom_name
local_group_size(16, 16) .push_constant(Type texture
CCL_NAMESPACE_BEGIN struct Options options
#define CCL_NAMESPACE_END
CCL_NAMESPACE_BEGIN typedef OSL::ustringhash OSLUStringHash
OSL::ustringrep OSLUStringRep
OIIO::unordered_map_concurrent< OSLUStringHash, OSLTextureHandleRef > OSLTextureHandleMap
OIIO::intrusive_ptr< OSLTextureHandle > OSLTextureHandleRef
OSLTextureHandle(Type type=OIIO, int svm_slot=-1)
OSLTextureHandle(const ImageHandle &handle)
ColorSpaceProcessor * processor
OSLTextureHandle(Type type, const vector< int4 > &svm_slots)
OSL::TextureSystem::TextureHandle * oiio_handle