75 if (!preserve_shaders)
103 if (
name == ustring())
106 foreach (
Node *
node, used_shaders) {
119 foreach (
Node *
node, used_shaders) {
129 return (motion_steps > 1) ? 2.0f * step / (motion_steps - 1) - 1.0f : 0.0f;
134 if (motion_steps > 1) {
137 for (
int step = 0; step < motion_steps; step++) {
139 if (step_time ==
time) {
144 if (step != motion_steps / 2) {
172 foreach (
Node *
node, used_shaders) {
197 string msg =
"Updating Geometry BVH ";
207 object.set_is_shadow_catcher(
true);
208 object.set_visibility(~0);
210 object.set_geometry(
this);
213 geometry.push_back(
this);
215 objects.push_back(&
object);
232 params->use_bvh_unaligned_nodes;
272 foreach (
Node *
node, used_shaders) {
313 og->object_name_map.clear();
314 og->attribute_map.clear();
315 og->object_names.clear();
322 og->object_name_map[
object->name] = i;
323 og->object_names.push_back(object->
name);
326 foreach (ParamValue &attr, object->
attributes) {
329 osl_attr.type = attr.type();
331 osl_attr.value = attr;
332 osl_attr.desc.offset = 0;
333 osl_attr.desc.flags = 0;
340 size_t j =
object->geometry->index;
341 assert(j < scene->geometry.size() &&
scene->
geometry[j] == object->geometry);
350 osl_attr.desc = req.
desc;
352 if (req.
type == TypeDesc::TypeFloat)
353 osl_attr.
type = TypeDesc::TypeFloat;
354 else if (req.
type == TypeDesc::TypeMatrix)
355 osl_attr.type = TypeDesc::TypeMatrix;
361 osl_attr.type = TypeDesc::TypeColor;
368 else if (req.
name != ustring()) {
377 if (req.
subd_type == TypeDesc::TypeFloat)
378 osl_attr.
type = TypeDesc::TypeFloat;
379 else if (req.
subd_type == TypeDesc::TypeMatrix)
380 osl_attr.type = TypeDesc::TypeMatrix;
386 osl_attr.type = TypeDesc::TypeColor;
393 else if (req.
name != ustring()) {
403 (
void)geom_attributes;
411 attr_map[index].
id =
id;
415 if (
type == TypeDesc::TypeFloat)
417 else if (
type == TypeDesc::TypeMatrix)
421 else if (
type == TypeFloat4)
440 attr_map[index + j].
element = chain;
441 attr_map[index + j].
offset = chain ? chain_link + j : 0;
442 attr_map[index + j].
type = 0;
443 attr_map[index + j].
flags = 0;
478 int attr_map_size = 0;
490 if (object_attributes[i].
size() == 0) {
491 object->attr_map_offset = 0;
494 object->attr_map_offset = attr_map_size;
499 if (attr_map_size == 0)
530 if (attributes.
size() > 0) {
531 int index =
object->attr_map_offset;
549 size_t *attr_float_size,
550 size_t *attr_float2_size,
551 size_t *attr_float3_size,
552 size_t *attr_float4_size,
553 size_t *attr_uchar4_size)
562 *attr_uchar4_size +=
size;
564 else if (mattr->
type == TypeDesc::TypeFloat) {
565 *attr_float_size +=
size;
568 *attr_float2_size +=
size;
570 else if (mattr->
type == TypeDesc::TypeMatrix) {
571 *attr_float4_size +=
size * 4;
574 *attr_float4_size +=
size;
577 *attr_float3_size +=
size;
582 void GeometryManager::update_attribute_element_offset(
Geometry *geom,
584 size_t &attr_float_offset,
586 size_t &attr_float2_offset,
588 size_t &attr_float3_offset,
590 size_t &attr_float4_offset,
592 size_t &attr_uchar4_offset,
617 offset = attr_uchar4_offset;
621 for (
size_t k = 0; k <
size; k++) {
626 attr_uchar4_offset +=
size;
628 else if (mattr->
type == TypeDesc::TypeFloat) {
630 offset = attr_float_offset;
634 for (
size_t k = 0; k <
size; k++) {
639 attr_float_offset +=
size;
643 offset = attr_float2_offset;
647 for (
size_t k = 0; k <
size; k++) {
652 attr_float2_offset +=
size;
654 else if (mattr->
type == TypeDesc::TypeMatrix) {
656 offset = attr_float4_offset;
660 for (
size_t k = 0; k <
size * 3; k++) {
661 attr_float4[
offset + k] = (&tfm->
x)[k];
665 attr_float4_offset +=
size * 3;
669 offset = attr_float4_offset;
673 for (
size_t k = 0; k <
size; k++) {
678 attr_float4_offset +=
size;
682 offset = attr_float3_offset;
686 for (
size_t k = 0; k <
size; k++) {
691 attr_float3_offset +=
size;
721 Hair *hair =
static_cast<Hair *
>(geom);
748 progress.
set_status(
"Updating Mesh",
"Computing attributes");
761 foreach (
Node *
node, geom->get_used_shaders()) {
766 if (geom->
is_hair() &&
static_cast<Hair *
>(geom)->need_shadow_transparency()) {
780 size_t geom_idx = geom->
index;
782 assert(geom_idx < scene->geometry.size() &&
scene->
geometry[geom_idx] == geom);
790 for (
size_t j = 0; j <
object->attributes.size(); j++) {
791 ParamValue ¶m =
object->attributes[j];
795 attributes.
add(param.name());
798 assert(param.datasize() == attr->
buffer.size());
799 memcpy(attr->
buffer.data(), param.data(), param.datasize());
811 size_t attr_float_size = 0;
812 size_t attr_float2_size = 0;
813 size_t attr_float3_size = 0;
814 size_t attr_float4_size = 0;
815 size_t attr_uchar4_size = 0;
851 foreach (
Attribute &attr, object_attribute_values[i].attributes) {
878 size_t attr_float_offset = 0;
879 size_t attr_float2_offset = 0;
880 size_t attr_float3_offset = 0;
881 size_t attr_float4_offset = 0;
882 size_t attr_uchar4_offset = 0;
899 update_attribute_element_offset(geom,
924 update_attribute_element_offset(
mesh,
958 update_attribute_element_offset(object->geometry,
993 progress.
set_status(
"Updating Mesh",
"Copying Attributes to device");
1011 size_t vert_size = 0;
1012 size_t tri_size = 0;
1014 size_t curve_size = 0;
1015 size_t curve_key_size = 0;
1016 size_t curve_segment_size = 0;
1018 size_t point_size = 0;
1020 size_t patch_size = 0;
1021 size_t face_size = 0;
1022 size_t corner_size = 0;
1025 bool prim_offset_changed =
false;
1032 mesh->vert_offset = vert_size;
1035 mesh->patch_offset = patch_size;
1036 mesh->face_offset = face_size;
1037 mesh->corner_offset = corner_size;
1047 if (
mesh->patch_table) {
1048 mesh->patch_table_offset = patch_size;
1054 corner_size +=
mesh->subd_face_corners.
size();
1057 Hair *hair =
static_cast<Hair *
>(geom);
1065 curve_key_size += hair->get_curve_keys().size();
1071 prim_offset_changed = (pointcloud->
prim_offset != point_size);
1077 if (prim_offset_changed) {
1094 size_t vert_size = 0;
1095 size_t tri_size = 0;
1097 size_t curve_key_size = 0;
1098 size_t curve_size = 0;
1099 size_t curve_segment_size = 0;
1101 size_t point_size = 0;
1103 size_t patch_size = 0;
1117 if (
mesh->patch_table) {
1118 mesh->patch_table_offset = patch_size;
1124 Hair *hair =
static_cast<Hair *
>(geom);
1126 curve_key_size += hair->get_curve_keys().size();
1137 if (tri_size != 0) {
1139 progress.
set_status(
"Updating Mesh",
"Computing normals");
1158 if (
mesh->shader_is_modified() ||
mesh->smooth_is_modified() ||
1159 mesh->triangles_is_modified() || copy_all_data) {
1163 if (
mesh->verts_is_modified() || copy_all_data) {
1167 if (
mesh->verts_is_modified() ||
mesh->triangles_is_modified() ||
1168 mesh->vert_patch_uv_is_modified() || copy_all_data) {
1172 &tri_patch_uv[
mesh->vert_offset]);
1181 progress.
set_status(
"Updating Mesh",
"Copying Mesh to device");
1191 if (curve_segment_size != 0) {
1192 progress.
set_status(
"Updating Mesh",
"Copying Curves to device");
1204 Hair *hair =
static_cast<Hair *
>(geom);
1206 bool curve_keys_co_modified = hair->curve_radius_is_modified() ||
1207 hair->curve_keys_is_modified();
1208 bool curve_data_modified = hair->curve_shader_is_modified() ||
1209 hair->curve_first_key_is_modified();
1211 if (!curve_keys_co_modified && !curve_data_modified && !copy_all_data) {
1229 if (point_size != 0) {
1230 progress.
set_status(
"Updating Mesh",
"Copying Point clouds to device");
1250 progress.
set_status(
"Updating Mesh",
"Copying Patches to device");
1259 if (
mesh->patch_table) {
1261 mesh->patch_table_offset);
1279 progress.
set_status(
"Updating Scene BVH",
"Building");
1296 const bool can_refit =
scene->
bvh !=
nullptr &&
1305 device->
build_bvh(bvh, progress, can_refit);
1314 if (has_bvh2_layout) {
1315 pack = std::move(
static_cast<BVH2 *
>(bvh)->pack);
1322 progress.
set_status(
"Updating Scene BVH",
"Copying BVH to device");
1409 switch (kernel_type) {
1467 scene->update_stats->geometry.times.add_entry({
"device_update_preprocess", time});
1471 progress.set_status(
"Updating Meshes Flags");
1474 bool volume_images_updated =
false;
1486 foreach (
Node *
node, geom->get_used_shaders()) {
1524 mesh->tag_verts_modified();
1525 mesh->tag_subd_dicing_rate_modified();
1526 mesh->tag_subd_max_level_modified();
1527 mesh->tag_subd_objecttoworld_modified();
1546 if (!volume_images_updated) {
1547 progress.set_status(
"Updating Meshes Volume Bounds");
1548 device_update_volume_images(device,
scene, progress);
1549 volume_images_updated =
true;
1553 create_volume_mesh(
scene, volume, progress);
1561 Hair *hair =
static_cast<Hair *
>(geom);
1595 if (update_flags & (MESH_ADDED | MESH_REMOVED)) {
1599 if (update_flags & (HAIR_ADDED | HAIR_REMOVED)) {
1603 if (update_flags & (POINT_ADDED | POINT_REMOVED)) {
1646 if ((update_flags & VISIBILITY_MODIFIED) != 0) {
1709 need_flags_update =
false;
1716 progress.
set_status(
"Updating Displacement Images");
1719 set<int> bump_images;
1725 bool need_shadow_transparency =
false;
1727 Hair *hair =
static_cast<Hair *
>(geom);
1731 foreach (
Node *
node, geom->get_used_shaders()) {
1735 if (!is_true_displacement && !need_shadow_transparency) {
1747 bump_images.insert(slot);
1754 foreach (
int slot, bump_images) {
1763 progress.
set_status(
"Updating Volume Images");
1766 set<int> volume_images;
1782 const int slot = handle.
svm_slot();
1784 volume_images.insert(slot);
1790 foreach (
int slot, volume_images) {
1807 bool true_displacement_used =
false;
1808 bool curve_shadow_transparency_used =
false;
1809 size_t total_tess_needed = 0;
1814 scene->update_stats->geometry.times.add_entry({
"device_update (normals)", time});
1833 total_tess_needed++;
1838 true_displacement_used =
true;
1842 Hair *hair =
static_cast<Hair *
>(geom);
1844 curve_shadow_transparency_used =
true;
1855 if (progress.get_cancel()) {
1860 if (total_tess_needed) {
1863 scene->update_stats->geometry.times.add_entry(
1864 {
"device_update (adaptive subdivision)", time});
1870 dicing_camera->get_full_height());
1881 string msg =
"Tessellating ";
1888 progress.set_status(
"Updating Mesh", msg);
1896 if (progress.get_cancel()) {
1902 if (progress.get_cancel()) {
1908 bool old_need_object_flags_update =
false;
1909 if (true_displacement_used || curve_shadow_transparency_used) {
1912 scene->update_stats->geometry.times.add_entry(
1913 {
"device_update (displacement: load images)", time});
1916 device_update_displacement_images(device,
scene, progress);
1922 device_free(device, dscene,
false);
1925 device->get_bvh_layout_mask());
1926 geom_calc_offset(
scene, bvh_layout);
1927 if (true_displacement_used || curve_shadow_transparency_used) {
1930 scene->update_stats->geometry.times.add_entry(
1931 {
"device_update (displacement: copy meshes to device)", time});
1934 device_update_mesh(device, dscene,
scene, progress);
1936 if (progress.get_cancel()) {
1943 scene->update_stats->geometry.times.add_entry({
"device_update (attributes)", time});
1946 device_update_attributes(device, dscene,
scene, progress);
1947 if (progress.get_cancel()) {
1953 bool displacement_done =
false;
1954 bool curve_shadow_transparency_done =
false;
1959 device->const_copy_to(
"data", &dscene->
data,
sizeof(dscene->
data));
1963 scene->update_stats->geometry.times.add_entry({
"device_update (displacement)", time});
1971 if (displace(device,
scene,
mesh, progress)) {
1972 displacement_done =
true;
1976 Hair *hair =
static_cast<Hair *
>(geom);
1978 curve_shadow_transparency_done =
true;
1989 if (progress.get_cancel()) {
1995 if (progress.get_cancel()) {
2000 if (displacement_done || curve_shadow_transparency_done) {
2003 scene->update_stats->geometry.times.add_entry(
2004 {
"device_update (displacement: attributes)", time});
2007 device_free(device, dscene,
false);
2009 device_update_attributes(device, dscene,
scene, progress);
2010 if (progress.get_cancel()) {
2020 bool need_update_scene_bvh = (
scene->
bvh ==
nullptr ||
2021 (update_flags & (TRANSFORM_MODIFIED | VISIBILITY_MODIFIED)) != 0);
2025 scene->update_stats->geometry.times.add_entry({
"device_update (build object BVHs)", time});
2033 need_update_scene_bvh =
true;
2060 scene->update_stats->geometry.times.add_entry({
"device_update (compute bounds)", time});
2064 object->compute_bounds(motion_blur);
2068 if (progress.get_cancel()) {
2072 if (need_update_scene_bvh) {
2075 scene->update_stats->geometry.times.add_entry({
"device_update (build scene BVH)", time});
2078 device_update_bvh(device, dscene,
scene, progress);
2079 if (progress.get_cancel()) {
2087 device->get_bvh_layout_mask());
2092 scene->update_stats->geometry.times.add_entry(
2093 {
"device_update (copy meshes to device)", time});
2096 device_update_mesh(device, dscene,
scene, progress);
2097 if (progress.get_cancel()) {
2102 if (true_displacement_used) {
2124 update_flags = UPDATE_NONE;
2190 og->object_name_map.clear();
2191 og->attribute_map.clear();
2192 og->object_names.clear();
2201 update_flags |= flag;
_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
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
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
ATTR_WARN_UNUSED_RESULT const void * element
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
CCL_NAMESPACE_BEGIN const char * bvh_layout_name(BVHLayout layout)
vector< AttributeRequest > requests
AttributeDescriptor subd_desc
Attribute * add(ustring name, TypeDesc type, AttributeElement element)
list< Attribute > attributes
Attribute * find(ustring name) const
bool modified(AttrKernelDataType kernel_type) const
ImageHandle & data_voxel()
static AttrKernelDataType kernel_type(const Attribute &attr)
Transform * data_transform()
size_t element_size(Geometry *geom, AttributePrimitive prim) const
static const char * standard_name(AttributeStandard std)
int num_motion_triangle_steps
static BVHLayout best_bvh_layout(BVHLayout requested_layout, BVHLayoutMask supported_layouts)
bool use_compact_structure
int num_motion_point_steps
int num_motion_curve_steps
virtual void replace_geometry(const vector< Geometry * > &geometry, const vector< Object * > &objects)
static BVH * create(const BVHParams ¶ms, const vector< Geometry * > &geometry, const vector< Object * > &objects, Device *device)
device_vector< uint > points_shader
device_vector< float2 > prim_time
device_vector< uint > patches
device_vector< float4 > points
device_vector< uint > prim_visibility
device_vector< uint4 > tri_vindex
device_vector< float4 > attributes_float4
device_vector< KernelCurveSegment > curve_segments
device_vector< float2 > attributes_float2
device_vector< AttributeMap > attributes_map
device_vector< KernelCurve > curves
device_vector< int > object_node
device_vector< packed_float3 > attributes_float3
device_vector< int > prim_object
device_vector< float4 > curve_keys
device_vector< packed_float3 > tri_vnormal
device_vector< int4 > bvh_leaf_nodes
device_vector< uint > tri_shader
device_vector< packed_float3 > tri_verts
device_vector< float > attributes_float
device_vector< float2 > tri_patch_uv
device_vector< uint > tri_patch
device_vector< int > prim_type
device_vector< int4 > bvh_nodes
device_vector< int > prim_index
device_vector< uchar4 > attributes_uchar4
virtual BVHLayoutMask get_bvh_layout_mask() const =0
virtual void build_bvh(BVH *bvh, Progress &progress, bool refit)
virtual void * get_cpu_osl_memory()
void device_update_displacement_images(Device *device, Scene *scene, Progress &progress)
void update_osl_attributes(Device *device, Scene *scene, vector< AttributeRequestSet > &geom_attributes)
void device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)
void geom_calc_offset(Scene *scene, BVHLayout bvh_layout)
void device_update_attributes(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)
void device_free(Device *device, DeviceScene *dscene, bool force_free)
void tag_update(Scene *scene, uint32_t flag)
void device_update_bvh(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)
void collect_statistics(const Scene *scene, RenderStats *stats)
void device_update_preprocess(Device *device, Scene *scene, Progress &progress)
void device_update_volume_images(Device *device, Scene *scene, Progress &progress)
void update_svm_attributes(Device *device, DeviceScene *dscene, Scene *scene, vector< AttributeRequestSet > &geom_attributes, vector< AttributeRequestSet > &object_attributes)
void device_update_mesh(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)
Transform transform_normal
float motion_time(int step) const
virtual void compute_bounds()=0
bool need_update_bvh_for_offset
bool has_voxel_attributes() const
bool has_true_displacement() const
bool need_build_bvh(BVHLayout layout) const
bool is_pointcloud() const
int motion_step(float time) const
bool need_attribute(Scene *scene, AttributeStandard std)
bool is_instanced() const
AttributeRequestSet needed_attributes()
bool has_motion_blur() const
void tag_update(Scene *scene, bool rebuild)
Geometry(const NodeType *node_type, const Type type)
bool transform_negative_scaled
void compute_bvh(Device *device, DeviceScene *dscene, SceneParams *params, Progress *progress, size_t n, size_t total)
void tag_bvh_update(bool rebuild)
virtual void clear(bool preserve_shaders=false)
bool need_shadow_transparency()
size_t curve_segment_offset
size_t num_curves() const
bool update_shadow_transparency(Device *device, Scene *scene, Progress &progress)
void pack_curves(Scene *scene, float4 *curve_key_co, KernelCurve *curve, KernelCurveSegment *curve_segments)
size_t num_segments() const
CurveShapeType curve_shape
VDBImageLoader * vdb_loader(const int tile_index=0) const
int svm_slot(const int tile_index=0) const
void device_update_slot(Device *device, Scene *scene, int slot, Progress *progress)
void tag_update(Scene *scene, uint32_t flag)
void add_entry(const NamedSizeEntry &entry)
void tag_update(Scene *scene, uint32_t flag)
void device_update_geom_offsets(Device *device, DeviceScene *dscene, Scene *scene)
void device_update_flags(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress, bool bounds_valid=true)
void set_status(const string &status_, const string &substatus_="")
bool use_bvh_unaligned_nodes
bool use_bvh_spatial_split
CurveShapeType hair_shape
list< ShaderNode * > nodes
uint get_attribute_id(ustring name)
bool need_update_attribute
NODE_DECLARE ShaderGraph * graph
bool need_update_displacement
bool has_surface_emission
AttributeRequestSet attributes
T * alloc(size_t width, size_t height=0, size_t depth=0)
void copy_to_device_if_modified()
void steal_data(array< T > &from)
void free_if_need_realloc(bool force_free)
#define CCL_NAMESPACE_END
SyclQueue void void size_t num_bytes void
#define MEM_GUARDED_CALL(progress, func,...)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
@ ATTR_STD_POSITION_UNDISPLACED
@ ATTR_STD_MOTION_VERTEX_POSITION
@ ATTR_STD_SHADOW_TRANSPARENCY
@ BVH_LAYOUT_MULTI_METAL_EMBREE
@ BVH_LAYOUT_MULTI_OPTIX_EMBREE
@ ATTR_ELEMENT_CORNER_BYTE
@ ATTR_ELEMENT_CURVE_KEY_MOTION
@ ATTR_ELEMENT_VERTEX_MOTION
static void vnormal(PROCESS *process, const float point[3], float r_no[3])
#define SOCKET_NODE_ARRAY(name, ui_name, node_type,...)
#define SOCKET_UINT(name, ui_name, default_value,...)
#define SOCKET_BOOLEAN(name, ui_name, default_value,...)
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_NAMESPACE_BEGIN typedef KernelBVHLayout BVHLayout
static void emit_attribute_map_terminator(AttributeMap *attr_map, int index, bool chain, uint chain_link)
static void update_device_flags_attribute(uint32_t &device_update_flags, const AttributeSet &attributes)
static void emit_attribute_mapping(AttributeMap *attr_map, int index, Scene *scene, AttributeRequest &req, Geometry *geom)
static void emit_attribute_map_entry(AttributeMap *attr_map, int index, uint id, TypeDesc type, const AttributeDescriptor &desc)
static void update_attribute_element_size(Geometry *geom, Attribute *mattr, AttributePrimitive prim, size_t *attr_float_size, size_t *attr_float2_size, size_t *attr_float3_size, size_t *attr_float4_size, size_t *attr_uchar4_size)
@ DEVICE_MESH_DATA_NEEDS_REALLOC
@ DEVICE_POINT_DATA_MODIFIED
@ DEVICE_POINT_DATA_NEEDS_REALLOC
@ ATTR_FLOAT4_NEEDS_REALLOC
@ ATTR_UCHAR4_NEEDS_REALLOC
@ ATTR_FLOAT2_NEEDS_REALLOC
@ DEVICE_MESH_DATA_MODIFIED
@ DEVICE_CURVE_DATA_MODIFIED
@ ATTR_FLOAT_NEEDS_REALLOC
@ CURVE_DATA_NEED_REALLOC
@ POINT_DATA_NEED_REALLOC
@ DEVICE_CURVE_DATA_NEEDS_REALLOC
@ ATTR_FLOAT3_NEEDS_REALLOC
static void update_attribute_realloc_flags(uint32_t &device_update_flags, const AttributeSet &attributes)
CCL_NAMESPACE_BEGIN NODE_ABSTRACT_DEFINE(Geometry)
@ SHADER_SPECIAL_TYPE_IMAGE_SLOT
CCL_NAMESPACE_BEGIN string string_printf(const char *format,...)
void set_screen_size(int width_, int height_)
void update(Scene *scene)
int num_ptex_faces() const
void tessellate(DiagSplit *split)
void pack_verts(packed_float3 *tri_verts, uint4 *tri_vindex, uint *tri_patch, float2 *tri_patch_uv)
size_t get_num_subd_faces() const
void add_vertex_normals()
void pack_patches(uint *patch_data)
@ SUBDIVISION_CATMULL_CLARK
size_t num_triangles() const
void pack_normals(packed_float3 *vnormal)
SubdFace get_subd_face(size_t index) const
void pack_shaders(Scene *scene, uint *shader)
static NodeType * add(const char *name, CreateFunc create, Type type=NONE, const NodeType *base=NULL)
void dereference_all_used_nodes()
size_t get_total_size_in_bytes() const
vector< ParamValue > attributes
array< uint > prim_visibility
array< float2 > prim_time
void copy_adjusting_offsets(uint *dest, int doffset)
void pack(Scene *scene, float4 *packed_points, uint *packed_shader)
size_t num_points() const
bool need_global_attribute(AttributeStandard std)
vector< Geometry * > geometry
MotionType need_motion() const
void need_global_attributes(AttributeRequestSet &attributes)
vector< Shader * > shaders
ImageManager * image_manager
vector< Object * > objects
ObjectManager * object_manager
ShaderManager * shader_manager
LightManager * light_manager
SceneUpdateStats * update_stats
GeometryManager * geometry_manager
string full_report() const
void push(TaskRunFunction &&task)
void wait_work(Summary *stats=NULL)
ccl_device_inline uint as_uint(int i)