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;
95 OSL::Matrix44 &result,
96 OSL::TransformationPtr xform,
99 OSL::Matrix44 &result,
100 OSL::TransformationPtr xform,
101 float time)
override;
104 OSL::Matrix44 &result,
106 float time)
override;
108 OSL::Matrix44 &result,
110 float time)
override;
113 OSL::Matrix44 &result,
114 OSL::TransformationPtr xform)
override;
116 OSL::Matrix44 &result,
117 OSL::TransformationPtr xform)
override;
121 OSL::Matrix44 &result,
147 OSL::ShaderGlobals *sg,
152 const OSL::Vec3 ¢er,
157 float *out_distances,
158 int derivs_offset)
override;
166 void *out_data)
override;
170 const OSL::Vec3 &
pos,
174 const void **data)
override;
177 OSL::ShaderGlobals *sg,
179 const OSL::Vec3 &dPdx,
180 const OSL::Vec3 &dPdy,
182 const OSL::Vec3 &dRdx,
183 const OSL::Vec3 &dRdy)
override;
190 bool derivatives)
override;
192#if OSL_LIBRARY_VERSION_CODE >= 11304
194 OSL::ShadingContext *context,
195 const TextureOpt *
options)
override;
197 OSL::ShadingContext *context,
198 const TextureOpt *
options)
override;
199#elif OSL_LIBRARY_VERSION_CODE >= 11100
201 OSL::ShadingContext *context)
override;
206 bool good(TextureSystem::TextureHandle *texture_handle)
override;
209 TextureSystem::TextureHandle *texture_handle,
210 TexturePerthread *texture_thread_info,
212 OSL::ShaderGlobals *sg,
226 TextureHandle *texture_handle,
227 TexturePerthread *texture_thread_info,
229 OSL::ShaderGlobals *sg,
231 const OSL::Vec3 &dPdx,
232 const OSL::Vec3 &dPdy,
233 const OSL::Vec3 &dPdz,
242 TextureHandle *texture_handle,
243 TexturePerthread *texture_thread_info,
245 OSL::ShaderGlobals *sg,
247 const OSL::Vec3 &dRdx,
248 const OSL::Vec3 &dRdy,
255#if OSL_LIBRARY_VERSION_CODE >= 11304
257 TextureHandle *texture_handle,
258 TexturePerthread *texture_thread_info,
259 OSL::ShaderGlobals *sg,
265#elif OSL_LIBRARY_VERSION_CODE >= 11100
267 TextureHandle *texture_handle,
268 TexturePerthread *texture_thread_info,
269 OSL::ShadingContext *shading_context,
278 TextureHandle *texture_handle,
282 void *data)
override;
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::ustring OSLUStringHash
OSL::ustring 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