8 #if (defined(__GNUC__) && !defined(__clang__)) && defined(NDEBUG)
9 # pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
10 # pragma GCC diagnostic ignored "-Wuninitialized"
60 memcpy((
void *)&m, &
t,
sizeof(m));
66 memcpy((
void *)&m, &
t,
sizeof(m));
128 : texture_system(texture_system)
141 OSL::TransformationPtr xform,
149 int object = sd->object;
152 #ifdef __OBJECT_MOTION__
155 if (
time == sd->time)
158 tfm = object_fetch_transform_motion_test(kg,
object,
time,
NULL);
179 OSL::TransformationPtr xform,
187 int object = sd->object;
190 #ifdef __OBJECT_MOTION__
193 if (
time == sd->time)
196 object_fetch_transform_motion_test(kg,
object,
time, &itfm);
281 OSL::TransformationPtr xform)
288 int object = sd->object;
309 OSL::TransformationPtr xform)
316 int object = sd->object;
401 float *fval = (
float *)val;
420 else if (
type == TypeDesc::TypePoint ||
type == TypeDesc::TypeVector ||
421 type == TypeDesc::TypeNormal ||
type == TypeDesc::TypeColor) {
422 float *fval = (
float *)val;
440 else if (
type == TypeDesc::TypeFloat) {
441 float *fval = (
float *)val;
469 float *fval = (
float *)val;
488 else if (
type == TypeDesc::TypePoint ||
type == TypeDesc::TypeVector ||
489 type == TypeDesc::TypeNormal ||
type == TypeDesc::TypeColor) {
490 float *fval = (
float *)val;
508 else if (
type == TypeDesc::TypeFloat) {
509 float *fval = (
float *)val;
544 float *fval = (
float *)val;
564 else if (
type == TypeDesc::TypePoint ||
type == TypeDesc::TypeVector ||
565 type == TypeDesc::TypeNormal ||
type == TypeDesc::TypeColor) {
581 else if (
type == TypeDesc::TypeFloat) {
607 float *fval = (
float *)val;
626 else if (
type == TypeDesc::TypePoint ||
type == TypeDesc::TypeVector ||
627 type == TypeDesc::TypeNormal ||
type == TypeDesc::TypeColor) {
628 float *fval = (
float *)val;
645 else if (
type == TypeDesc::TypeFloat) {
646 float *fval = (
float *)val;
673 if (
type.basetype == TypeDesc::INT &&
type.aggregate == TypeDesc::SCALAR &&
type.arraylen == 0) {
674 int *ival = (
int *)val;
690 if (
type.basetype == TypeDesc::STRING &&
type.aggregate == TypeDesc::SCALAR &&
691 type.arraylen == 0) {
692 ustring *sval = (ustring *)val;
709 float *fval = (
float *)val;
723 if (
type.arraylen > 3)
724 memset(fval + 3 * 3, 0,
sizeof(
float) * 3 * (
type.arraylen - 3));
726 memset(fval +
type.arraylen * 3, 0,
sizeof(
float) * 2 * 3 *
type.arraylen);
736 if (
type == TypeDesc::TypeMatrix) {
747 const TypeDesc &
type,
751 if (attr.type == TypeDesc::TypePoint || attr.type == TypeDesc::TypeVector ||
752 attr.type == TypeDesc::TypeNormal || attr.type == TypeDesc::TypeColor) {
754 if (primitive_is_volume_attribute(sd, attr.desc)) {
755 fval[0] = primitive_volume_attribute_float3(kg, sd, attr.desc);
758 memset(fval, 0,
sizeof(fval));
760 kg, sd, attr.desc, (derivatives) ? &fval[1] :
NULL, (derivatives) ? &fval[2] :
NULL);
765 if (primitive_is_volume_attribute(sd, attr.desc)) {
766 assert(!
"Float2 attribute not support for volumes");
772 kg, sd, attr.desc, (derivatives) ? &fval[1] :
NULL, (derivatives) ? &fval[2] :
NULL);
776 else if (attr.type == TypeDesc::TypeFloat) {
778 if (primitive_is_volume_attribute(sd, attr.desc)) {
779 memset(fval, 0,
sizeof(fval));
780 fval[0] = primitive_volume_attribute_float(kg, sd, attr.desc);
784 kg, sd, attr.desc, (derivatives) ? &fval[1] :
NULL, (derivatives) ? &fval[2] :
NULL);
788 else if (attr.type == TypeDesc::TypeFloat4 || attr.type ==
TypeRGBA) {
790 if (primitive_is_volume_attribute(sd, attr.desc)) {
791 memset(fval, 0,
sizeof(fval));
792 fval[0] = primitive_volume_attribute_float4(kg, sd, attr.desc);
796 kg, sd, attr.desc, (derivatives) ? &fval[1] :
NULL, (derivatives) ? &fval[2] :
NULL);
808 const TypeDesc &
type,
812 if (attr.type == TypeDesc::TypeMatrix) {
826 if (attr.type == TypeDesc::TypePoint || attr.type == TypeDesc::TypeVector ||
827 attr.type == TypeDesc::TypeNormal || attr.type == TypeDesc::TypeColor) {
828 const float *
data = (
const float *)attr.value.data();
832 const float *
data = (
const float *)attr.value.data();
835 else if (attr.type == TypeDesc::TypeFloat) {
836 const float *
data = (
const float *)attr.value.data();
839 else if (attr.type ==
TypeRGBA || attr.type == TypeDesc::TypeFloat4) {
840 const float *
data = (
const float *)attr.value.data();
844 else if (attr.type ==
type) {
845 size_t datasize = attr.value.datasize();
847 memcpy(val, attr.value.data(), datasize);
849 memset((
char *)val + datasize, 0, datasize * 2);
976 ustring object_name = kg->osl->object_names[sd->object];
989 float f = curve_thickness(kg, sd);
993 float3 f = curve_tangent_normal(kg, sd);
997 float f = curve_random(kg, sd);
1006 float f = point_radius(kg, sd);
1010 float3 f = point_position(kg, sd);
1014 float f = point_random(kg, sd);
1040 float f = sd->ray_length;
1047 int f = (
state) ?
state->path.bounce : (shadow_state) ? shadow_state->shadow_path.bounce : 0;
1054 int f = (
state) ?
state->path.diffuse_bounce :
1055 (shadow_state) ? shadow_state->shadow_path.diffuse_bounce :
1063 int f = (
state) ?
state->path.glossy_bounce :
1064 (shadow_state) ? shadow_state->shadow_path.glossy_bounce :
1072 int f = (
state) ?
state->path.transmission_bounce :
1073 (shadow_state) ? shadow_state->shadow_path.transmission_bounce :
1081 int f = (
state) ?
state->path.transparent_bounce :
1082 (shadow_state) ? shadow_state->shadow_path.transparent_bounce :
1086 else if (name ==
u_ndc) {
1088 OSLThreadData *tdata = kg->osl_tdata;
1089 OSL::ShaderGlobals *globals = &tdata->globals;
1118 ustring object_name,
1123 if (sg ==
NULL || sg->renderstate ==
NULL)
1131 ShaderData *sd,
bool derivatives, ustring object_name, TypeDesc
type, ustring name,
void *val)
1139 OSLGlobals::ObjectNameMap::iterator it = kg->osl->object_name_map.find(object_name);
1141 if (it == kg->osl->object_name_map.end())
1144 object = it->second;
1147 object = sd->object;
1157 OSLGlobals::AttributeMap::iterator it = attribute_map.find(name);
1159 if (it != attribute_map.end()) {
1177 kg, sd, name,
type, derivatives, val);
1179 if (is_std_object_attribute)
1189 bool derivatives, ustring name, TypeDesc
type, OSL::ShaderGlobals *sg,
void *val)
1194 #if OSL_LIBRARY_VERSION_CODE >= 11100
1196 OSL::ShadingContext *)
1202 OSLTextureHandleMap::iterator it =
textures.find(filename);
1207 return (TextureSystem::TextureHandle *)it->second.get();
1212 OSL::TextureSystem *ts = texture_system;
1213 TextureSystem::TextureHandle *handle = ts->get_texture_handle(filename);
1214 if (handle ==
NULL) {
1225 it->second->oiio_handle = handle;
1226 return (TextureSystem::TextureHandle *)it->second.get();
1243 TextureHandle *texture_handle,
1244 TexturePerthread *texture_thread_info,
1246 OSL::ShaderGlobals *sg,
1257 ustring *errormessage)
1263 bool status =
false;
1265 switch (texture_type) {
1268 if (nchannels >= 3) {
1314 int tile = 1001 + 10 * ty + tx;
1316 if (tile_node.
x ==
tile) {
1320 if (tile_node.
z ==
tile) {
1359 if (texture_thread_info ==
NULL) {
1361 texture_thread_info = tdata->oiio_thread_info;
1365 texture_thread_info,
1379 status = ts->texture(filename,
1406 if (nchannels == 3 || nchannels == 4) {
1420 TextureHandle *texture_handle,
1421 TexturePerthread *texture_thread_info,
1423 OSL::ShaderGlobals *sg,
1433 ustring *errormessage)
1437 bool status =
false;
1439 switch (texture_type) {
1463 if (texture_thread_info ==
NULL) {
1467 texture_thread_info = tdata->oiio_thread_info;
1471 texture_thread_info,
1484 status = ts->texture3d(filename,
1516 if (nchannels == 3 || nchannels == 4) {
1530 TextureHandle *texture_handle,
1531 TexturePerthread *thread_info,
1533 OSL::ShaderGlobals *sg,
1541 ustring *errormessage)
1545 bool status =
false;
1548 if (thread_info ==
NULL) {
1552 thread_info = tdata->oiio_thread_info;
1567 status = ts->environment(
1568 filename,
options,
R, dRdx, dRdy, nchannels,
result, dresultds, dresultdt);
1572 if (nchannels == 3 || nchannels == 4) {
1588 #if OSL_LIBRARY_VERSION_CODE >= 11100
1590 TextureHandle *texture_handle,
1592 OSL::ShadingContext *,
1601 TextureHandle *texture_handle,
1616 OSL::TextureSystem *ts = texture_system;
1617 return ts->get_texture_info(filename, subimage,
dataname, datatype,
data);
1626 size_t *out_indices,
1627 float *out_distances,
1648 const ustring *
names,
1649 const TypeDesc *
types,
1656 OSL::ShaderGlobals *sg,
1674 ray.
time = sd->time;
1682 if (ray.
P == sd->P) {
1703 OSLTraceData *tracedata = (OSLTraceData *)sg->tracedata;
1704 tracedata->ray = ray;
1705 tracedata->setup =
false;
1706 tracedata->init =
true;
1707 tracedata->hit =
false;
1708 tracedata->sd.osl_globals = sd->osl_globals;
1719 tracedata->hit =
scene_intersect(kg, &ray, visibility, &tracedata->isect);
1720 return tracedata->hit;
1730 OSLTraceData *tracedata = (OSLTraceData *)sg->tracedata;
1732 if (source ==
u_trace && tracedata->init) {
1733 if (name ==
u_hit) {
1736 else if (tracedata->hit) {
1738 float f[3] = {tracedata->isect.t, 0.0f, 0.0f};
1745 if (!tracedata->setup) {
1748 tracedata->setup =
true;
1754 else if (name ==
u_Ng) {
1757 else if (name ==
u_P) {
1758 float3 f[3] = {sd->P, sd->dP.dx, sd->dP.dy};
1761 else if (name ==
u_I) {
1762 float3 f[3] = {sd->I, sd->dI.dx, sd->dI.dy};
1765 else if (name ==
u_u) {
1766 float f[3] = {sd->u, sd->du.dx, sd->du.dy};
1769 else if (name ==
u_v) {
1770 float f[3] = {sd->v, sd->dv.dx, sd->dv.dy};
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint * textures
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Attribute
void sort(btMatrix3x3 &U, btVector3 &sigma, btMatrix3x3 &V, int t)
Helper function of 3X3 SVD for sorting singular values.
static void to_scene_linear(ustring colorspace, T *pixels, size_t num_pixels, bool is_rgba, bool compress_as_srgb)
static ustring u_path_transmission_depth
static ustring u_particle_location
bool pointcloud_write(OSL::ShaderGlobals *sg, ustring filename, const OSL::Vec3 &pos, int nattribs, const ustring *names, const TypeDesc *types, const void **data) override
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
static ustring u_point_position
static ustring u_point_radius
static bool get_object_standard_attribute(const KernelGlobalsCPU *kg, ShaderData *sd, ustring name, TypeDesc type, bool derivatives, void *val)
static ustring u_curve_tangent_normal
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
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
int pointcloud_get(OSL::ShaderGlobals *sg, ustring filename, size_t *indices, int count, ustring attr_name, TypeDesc attr_type, void *out_data) override
static ustring u_particle_rotation
OSL::TextureSystem * texture_system
static ustring u_particle_velocity
static ustring u_particle_angular_velocity
static ustring u_path_glossy_depth
static bool get_background_attribute(const KernelGlobalsCPU *kg, ShaderData *sd, ustring name, TypeDesc type, bool derivatives, void *val)
static ustring u_geom_dupli_uv
static ustring u_geom_undisplaced
static ustring u_geom_numpolyvertices
static ustring u_object_random
static ustring u_path_ray_length
bool getmessage(OSL::ShaderGlobals *sg, ustring source, ustring name, TypeDesc type, void *val, bool derivatives) override
bool environment(ustring 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, ustring *errormessage) override
bool get_attribute(OSL::ShaderGlobals *sg, bool derivatives, ustring object, TypeDesc type, ustring name, void *val) override
static ustring u_particle_random
static ustring u_particle_age
OSLRenderServices(OSL::TextureSystem *texture_system)
bool texture(ustring filename, TextureSystem::TextureHandle *texture_handle, TexturePerthread *texture_thread_info, TextureOpt &options, OSL::ShaderGlobals *sg, float s, float t, float dsdx, float dtdx, float dsdy, float dtdy, int nchannels, float *result, float *dresultds, float *dresultdt, ustring *errormessage) override
bool get_texture_info(OSL::ShaderGlobals *sg, ustring filename, TextureHandle *texture_handle, int subimage, ustring dataname, TypeDesc datatype, void *data) override
static ustring u_object_index
static ustring u_is_point
static ustring u_path_transparent_depth
TextureSystem::TextureHandle * get_texture_handle(ustring filename) 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
bool texture3d(ustring 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, ustring *errormessage) override
static ustring u_is_curve
static ustring u_object_color
static ustring u_distance
bool get_userdata(bool derivatives, ustring name, TypeDesc type, OSL::ShaderGlobals *sg, void *val) override
static ustring u_geom_trianglevertices
bool get_array_attribute(OSL::ShaderGlobals *sg, bool derivatives, ustring object, TypeDesc type, ustring name, int index, void *val) override
static ustring u_geom_polyvertices
static ustring u_particle_size
int pointcloud_search(OSL::ShaderGlobals *sg, ustring 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_dupli_generated
bool good(TextureSystem::TextureHandle *texture_handle) override
static ustring u_geom_name
#define CCL_NAMESPACE_END
CCL_NAMESPACE_BEGIN struct ProjectionTransform ProjectionTransform
ccl_device_inline ProjectionTransform projection_transpose(const ProjectionTransform &a)
CCL_NAMESPACE_BEGIN struct Options options
const KernelGlobalsCPU *ccl_restrict KernelGlobals
ccl_device_forceinline float differential_make_compact(const differential3 D)
SyclQueue void void size_t num_bytes SyclQueue void * kernel_globals
ccl_device_inline float hash_uint2_to_float(uint kx, uint ky)
ccl_device_intersect bool scene_intersect(KernelGlobals kg, ccl_private const Ray *ray, const uint visibility, ccl_private Intersection *isect)
ccl_device_inline float3 camera_world_to_ndc(KernelGlobals kg, ccl_private ShaderData *sd, float3 P)
ccl_global const KernelWorkTile * tile
ccl_gpu_kernel_postfix int ccl_global int * indices
ccl_gpu_kernel_postfix ccl_global float int int int int ccl_global const float int int int int int int int int int int int int num_samples
ccl_device_inline uint attribute_primitive_type(KernelGlobals kg, ccl_private const ShaderData *sd)
ccl_device Transform primitive_attribute_matrix(KernelGlobals kg, ccl_private const ShaderData *sd, const AttributeDescriptor desc)
ccl_device_inline float object_pass_id(KernelGlobals kg, int object)
ccl_device_inline float object_alpha(KernelGlobals kg, int object)
ccl_device float particle_age(KernelGlobals kg, int particle)
ccl_device float4 particle_rotation(KernelGlobals kg, int particle)
ccl_device_inline uint particle_index(KernelGlobals kg, int particle)
ccl_device_inline float3 object_location(KernelGlobals kg, ccl_private const ShaderData *sd)
ccl_device_inline float object_random_number(KernelGlobals kg, int object)
ccl_device float particle_lifetime(KernelGlobals kg, int particle)
ccl_device_inline void object_position_transform(KernelGlobals kg, ccl_private const ShaderData *sd, ccl_private float3 *P)
ccl_device float3 particle_angular_velocity(KernelGlobals kg, int particle)
ccl_device_inline int object_particle_id(KernelGlobals kg, int object)
ccl_device_inline float3 object_color(KernelGlobals kg, int object)
ccl_device_inline Transform object_get_transform(KernelGlobals kg, ccl_private const ShaderData *sd)
ccl_device int shader_pass_id(KernelGlobals kg, ccl_private const ShaderData *sd)
ccl_device float3 particle_velocity(KernelGlobals kg, int particle)
ccl_device float3 particle_location(KernelGlobals kg, int particle)
ccl_device float particle_size(KernelGlobals kg, int particle)
ccl_device_inline Transform lamp_fetch_transform(KernelGlobals kg, int lamp, bool inverse)
ccl_device_inline float3 object_dupli_generated(KernelGlobals kg, int object)
ccl_device_inline float3 object_dupli_uv(KernelGlobals kg, int object)
ccl_device_inline Transform object_get_inverse_transform(KernelGlobals kg, ccl_private const ShaderData *sd)
ccl_device_inline float kernel_ies_interp(KernelGlobals kg, int slot, float h_angle, float v_angle)
@ PATH_RAY_ALL_VISIBILITY
struct AttributeMap AttributeMap
@ SD_OBJECT_TRANSFORM_APPLIED
ccl_device_inline float average(const float2 &a)
ccl_device_inline float3 zero_float3()
ccl_device_inline float4 zero_float4()
ccl_device_inline void motion_triangle_vertices(KernelGlobals kg, int object, int prim, float time, float3 verts[3])
ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals kg, int id, float3 P, InterpolationType interp)
ccl_device float4 kernel_tex_image_interp(KernelGlobals kg, int id, float x, float y)
static const VertexNature POINT
static const pxr::TfToken rgba("rgba", pxr::TfToken::Immortal)
static constexpr TypeDesc TypeFloatArray4(TypeDesc::FLOAT, TypeDesc::SCALAR, TypeDesc::NOSEMANTICS, 4)
static constexpr TypeDesc TypeRGBA(TypeDesc::FLOAT, TypeDesc::VEC4, TypeDesc::COLOR)
CCL_NAMESPACE_BEGIN static constexpr OIIO_NAMESPACE_USING TypeDesc TypeFloat2(TypeDesc::FLOAT, TypeDesc::VEC2)
ccl_device_forceinline float3 primitive_surface_attribute_float3(KernelGlobals kg, ccl_private const ShaderData *sd, const AttributeDescriptor desc, ccl_private float3 *dx, ccl_private float3 *dy)
ccl_device_forceinline float2 primitive_surface_attribute_float2(KernelGlobals kg, ccl_private const ShaderData *sd, const AttributeDescriptor desc, ccl_private float2 *dx, ccl_private float2 *dy)
ccl_device_forceinline float4 primitive_surface_attribute_float4(KernelGlobals kg, ccl_private const ShaderData *sd, const AttributeDescriptor desc, ccl_private float4 *dx, ccl_private float4 *dy)
CCL_NAMESPACE_BEGIN ccl_device_forceinline float primitive_surface_attribute_float(KernelGlobals kg, ccl_private const ShaderData *sd, const AttributeDescriptor desc, ccl_private float *dx, ccl_private float *dy)
static const char * dataname(short id_code)
static bool set_attribute_string(ustring str, TypeDesc type, bool derivatives, void *val)
static bool set_attribute_float2(float2 f[3], TypeDesc type, bool derivatives, void *val)
static bool set_attribute_float3_3(float3 P[3], TypeDesc type, bool derivatives, void *val)
static bool set_attribute_int(int i, TypeDesc type, bool derivatives, void *val)
static bool set_attribute_matrix(const Transform &tfm, TypeDesc type, void *val)
static bool set_attribute_float4(float4 f[3], TypeDesc type, bool derivatives, void *val)
static bool get_mesh_attribute(const KernelGlobalsCPU *kg, const ShaderData *sd, const OSLGlobals::Attribute &attr, const TypeDesc &type, bool derivatives, void *val)
static bool get_object_attribute(const OSLGlobals::Attribute &attr, TypeDesc type, bool derivatives, void *val)
static bool set_attribute_float(float f[3], TypeDesc type, bool derivatives, void *val)
static bool get_primitive_attribute(const KernelGlobalsCPU *kg, const ShaderData *sd, const OSLGlobals::Attribute &attr, const TypeDesc &type, bool derivatives, void *val)
static bool set_attribute_float3(float3 f[3], TypeDesc type, bool derivatives, void *val)
static CCL_NAMESPACE_BEGIN void copy_matrix(OSL::Matrix44 &m, const Transform &tfm)
CCL_NAMESPACE_BEGIN ccl_device_inline void shader_setup_from_ray(KernelGlobals kg, ccl_private ShaderData *ccl_restrict sd, ccl_private const Ray *ccl_restrict ray, ccl_private const Intersection *ccl_restrict isect)
ColorSpaceProcessor * processor
OSL::TextureSystem::TextureHandle * oiio_handle
ccl_device_inline void triangle_vertices(KernelGlobals kg, int prim, float3 P[3])
ccl_device_inline float3 triangle_smooth_normal_unnormalized(KernelGlobals kg, ccl_private const ShaderData *sd, float3 Ng, int prim, float u, float v)
ccl_device_inline float3 float4_to_float3(const float4 a)
#define TEX_IMAGE_MISSING_R
#define TEX_IMAGE_MISSING_B
#define TEX_IMAGE_MISSING_A
#define TEX_IMAGE_MISSING_G