52 BL::BlendData &b_data,
64 particle_system_map(
scene),
76 dicing_rate = preview ?
RNA_float_get(&cscene,
"preview_dicing_rate") :
78 max_subdivisions =
RNA_int_get(&cscene,
"max_subdivisions");
91 this->b_data = b_data;
92 this->b_scene = b_scene;
110 bool dicing_prop_changed =
false;
112 float updated_dicing_rate = preview ?
RNA_float_get(&cscene,
"preview_dicing_rate") :
115 if (dicing_rate != updated_dicing_rate) {
116 dicing_rate = updated_dicing_rate;
117 dicing_prop_changed =
true;
120 int updated_max_subdivisions =
RNA_int_get(&cscene,
"max_subdivisions");
122 if (max_subdivisions != updated_max_subdivisions) {
123 max_subdivisions = updated_max_subdivisions;
124 dicing_prop_changed =
true;
127 if (dicing_prop_changed) {
130 for (
const pair<const GeometryKey, Geometry *> &iter : geometry_map.
key_to_scene_data()) {
145 for (BL::DepsgraphUpdate &b_update : b_depsgraph.updates) {
152 BL::ID b_id(b_update.id());
167 const bool is_geometry = object_is_geometry(b_ob);
168 const bool is_light = !is_geometry && object_is_light(b_ob);
170 if (b_ob.is_instancer() && b_update.is_updated_shading()) {
175 if (is_geometry || is_light) {
176 const bool updated_geometry = b_update.is_updated_geometry();
180 if (b_update.is_updated_transform() || b_update.is_updated_shading()) {
184 if (updated_geometry ||
186 BL::ID key = BKE_object_is_modified(b_ob) ? b_ob : b_ob.data();
190 if (updated_geometry) {
191 BL::Object::particle_systems_iterator b_psys;
192 for (b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end();
200 if (b_update.is_updated_transform() || b_update.is_updated_shading()) {
205 if (updated_geometry) {
219 if (world_map == b_world.ptr.data) {
233 if (viewport_parameters.modified(new_viewport_parameters)) {
243 has_updates_ |= film->get_display_pass() != new_display_pass;
250 BL::SpaceView3D &b_v3d,
254 void **python_thread_state)
267 sync_shaders(b_depsgraph, b_v3d);
270 geometry_synced.clear();
274 sync_objects(b_depsgraph, b_v3d);
276 sync_motion(b_render, b_depsgraph, b_v3d, b_override,
width,
height, python_thread_state);
278 geometry_synced.clear();
284 free_data_after_sync(b_depsgraph);
286 VLOG(1) <<
"Total time spent synchronizing data: " << timer.
get_time();
288 has_updates_ =
false;
295 BL::RenderSettings
r = b_scene.render();
298 experimental = (
get_enum(cscene,
"feature_set") != 0);
302 integrator->set_min_bounce(
get_int(cscene,
"min_light_bounces"));
303 integrator->set_max_bounce(
get_int(cscene,
"max_bounces"));
305 integrator->set_max_diffuse_bounce(
get_int(cscene,
"diffuse_bounces"));
306 integrator->set_max_glossy_bounce(
get_int(cscene,
"glossy_bounces"));
307 integrator->set_max_transmission_bounce(
get_int(cscene,
"transmission_bounces"));
308 integrator->set_max_volume_bounce(
get_int(cscene,
"volume_bounces"));
310 integrator->set_transparent_min_bounce(
get_int(cscene,
"min_transparent_bounces"));
311 integrator->set_transparent_max_bounce(
get_int(cscene,
"transparent_max_bounces"));
313 integrator->set_volume_max_steps(
get_int(cscene,
"volume_max_steps"));
314 float volume_step_rate = (preview) ?
get_float(cscene,
"volume_preview_step_rate") :
316 integrator->set_volume_step_rate(volume_step_rate);
318 integrator->set_caustics_reflective(
get_boolean(cscene,
"caustics_reflective"));
319 integrator->set_caustics_refractive(
get_boolean(cscene,
"caustics_refractive"));
320 integrator->set_filter_glossy(
get_float(cscene,
"blur_glossy"));
325 if (b_scene.frame_subframe() != 0.0f) {
329 seed +=
hash_uint2((
int)(b_scene.frame_subframe() * (
float)INT_MAX),
334 integrator->set_seed(
seed);
336 integrator->set_sample_clamp_direct(
get_float(cscene,
"sample_clamp_direct"));
337 integrator->set_sample_clamp_indirect(
get_float(cscene,
"sample_clamp_indirect"));
339 integrator->set_motion_blur(
r.use_motion_blur());
345 integrator->set_sample_all_lights_direct(
get_boolean(cscene,
"sample_all_lights_direct"));
346 integrator->set_sample_all_lights_indirect(
get_boolean(cscene,
"sample_all_lights_indirect"));
347 integrator->set_light_sampling_threshold(
get_float(cscene,
"light_sampling_threshold"));
352 int adaptive_min_samples = INT_MAX;
356 adaptive_min_samples =
get_int(cscene,
"adaptive_min_samples");
357 integrator->set_adaptive_threshold(
get_float(cscene,
"adaptive_threshold"));
360 integrator->set_adaptive_threshold(0.0f);
363 integrator->set_sampling_pattern(sampling_pattern);
365 int diffuse_samples =
get_int(cscene,
"diffuse_samples");
366 int glossy_samples =
get_int(cscene,
"glossy_samples");
367 int transmission_samples =
get_int(cscene,
"transmission_samples");
368 int ao_samples =
get_int(cscene,
"ao_samples");
369 int mesh_light_samples =
get_int(cscene,
"mesh_light_samples");
370 int subsurface_samples =
get_int(cscene,
"subsurface_samples");
371 int volume_samples =
get_int(cscene,
"volume_samples");
374 integrator->set_diffuse_samples(diffuse_samples * diffuse_samples);
375 integrator->set_glossy_samples(glossy_samples * glossy_samples);
376 integrator->set_transmission_samples(transmission_samples * transmission_samples);
377 integrator->set_ao_samples(ao_samples * ao_samples);
378 integrator->set_mesh_light_samples(mesh_light_samples * mesh_light_samples);
379 integrator->set_subsurface_samples(subsurface_samples * subsurface_samples);
380 integrator->set_volume_samples(volume_samples * volume_samples);
381 adaptive_min_samples =
min(adaptive_min_samples * adaptive_min_samples, INT_MAX);
384 integrator->set_diffuse_samples(diffuse_samples);
385 integrator->set_glossy_samples(glossy_samples);
386 integrator->set_transmission_samples(transmission_samples);
387 integrator->set_ao_samples(ao_samples);
388 integrator->set_mesh_light_samples(mesh_light_samples);
389 integrator->set_subsurface_samples(subsurface_samples);
390 integrator->set_volume_samples(volume_samples);
393 integrator->set_adaptive_min_samples(adaptive_min_samples);
397 integrator->set_ao_bounces(
get_int(cscene,
"ao_bounces"));
400 integrator->set_ao_bounces(
get_int(cscene,
"ao_bounces_render"));
404 integrator->set_ao_bounces(0);
413 void BlenderSync::sync_film(BL::SpaceView3D &b_v3d)
425 film->set_exposure(
get_float(cscene,
"film_exposure"));
426 film->set_filter_type(
428 float filter_width = (film->get_filter_type() ==
FILTER_BOX) ? 1.0f :
430 film->set_filter_width(filter_width);
432 if (b_scene.world()) {
433 BL::WorldMistSettings b_mist = b_scene.world().mist_settings();
435 film->set_mist_start(b_mist.start());
436 film->set_mist_depth(b_mist.depth());
438 switch (b_mist.falloff()) {
439 case BL::WorldMistSettings::falloff_QUADRATIC:
440 film->set_mist_falloff(2.0f);
442 case BL::WorldMistSettings::falloff_LINEAR:
443 film->set_mist_falloff(1.0f);
445 case BL::WorldMistSettings::falloff_INVERSE_QUADRATIC:
446 film->set_mist_falloff(0.5f);
461 view_layer.name = b_view_layer.name();
464 view_layer.use_background_shader = b_view_layer.use_sky();
465 view_layer.use_background_ao = b_view_layer.use_ao();
468 view_layer.use_hair = b_view_layer.use_strand();
469 view_layer.use_volumes = b_view_layer.use_volumes();
472 view_layer.material_override = b_view_layer.material_override();
476 int use_layer_samples =
get_enum(cscene,
"use_layer_samples");
478 view_layer.bound_samples = (use_layer_samples == 1);
479 view_layer.samples = 0;
481 if (use_layer_samples != 2) {
482 int samples = b_view_layer.samples();
484 view_layer.samples = samples * samples;
486 view_layer.samples = samples;
491 void BlenderSync::sync_images()
495 const bool is_interface_locked = b_engine.render() && b_engine.render().use_lock_interface();
503 for (
BL::Image &b_image : b_data.images) {
507 const bool is_builtin = b_image.packed_file() ||
508 b_image.source() == BL::Image::source_GENERATED ||
509 b_image.source() == BL::Image::source_MOVIE || b_engine.is_preview();
510 if (is_builtin ==
false) {
511 b_image.buffers_free();
520 string name = b_pass.name();
521 #define MAP_PASS(passname, passtype) \
522 if (name == passname) { \
558 #ifdef __KERNEL_DEBUG__
559 MAP_PASS(
"Debug BVH Traversed Nodes", PASS_BVH_TRAVERSED_NODES);
560 MAP_PASS(
"Debug BVH Traversed Instances", PASS_BVH_TRAVERSED_INSTANCES);
561 MAP_PASS(
"Debug BVH Intersections", PASS_BVH_INTERSECTIONS);
562 MAP_PASS(
"Debug Ray Bounces", PASS_RAY_BOUNCES);
577 string name = b_pass.name();
579 if (name ==
"Noisy Image")
582 if (name.substr(0, 10) !=
"Denoising ") {
585 name = name.substr(10);
587 #define MAP_PASS(passname, offset) \
588 if (name == passname) { \
607 bool adaptive_sampling,
616 if (pass_type ==
PASS_MOTION && b_scene.render().use_motion_blur())
619 Pass::add(pass_type, passes, b_pass.name().c_str());
624 int denoising_flags = 0;
627 #define MAP_OPTION(name, flag) \
628 if (!get_boolean(crl, name)) { \
629 denoising_flags |= flag; \
640 b_engine.add_pass(
"Noisy Image", 4,
"RGBA", b_view_layer.name().c_str());
642 scene->
film->set_denoising_flags(denoising_flags);
645 b_engine.add_pass(
"Denoising Normal", 3,
"XYZ", b_view_layer.name().c_str());
646 b_engine.add_pass(
"Denoising Albedo", 3,
"RGB", b_view_layer.name().c_str());
647 b_engine.add_pass(
"Denoising Depth", 1,
"Z", b_view_layer.name().c_str());
649 b_engine.add_pass(
"Denoising Shadowing", 1,
"X", b_view_layer.name().c_str());
650 b_engine.add_pass(
"Denoising Variance", 3,
"RGB", b_view_layer.name().c_str());
651 b_engine.add_pass(
"Denoising Intensity", 1,
"X", b_view_layer.name().c_str());
655 b_engine.add_pass(
"Denoising Clean", 3,
"RGB", b_view_layer.name().c_str());
659 #ifdef __KERNEL_DEBUG__
660 if (
get_boolean(crl,
"pass_debug_bvh_traversed_nodes")) {
661 b_engine.add_pass(
"Debug BVH Traversed Nodes", 1,
"X", b_view_layer.name().c_str());
662 Pass::add(PASS_BVH_TRAVERSED_NODES, passes,
"Debug BVH Traversed Nodes");
664 if (
get_boolean(crl,
"pass_debug_bvh_traversed_instances")) {
665 b_engine.add_pass(
"Debug BVH Traversed Instances", 1,
"X", b_view_layer.name().c_str());
666 Pass::add(PASS_BVH_TRAVERSED_INSTANCES, passes,
"Debug BVH Traversed Instances");
668 if (
get_boolean(crl,
"pass_debug_bvh_intersections")) {
669 b_engine.add_pass(
"Debug BVH Intersections", 1,
"X", b_view_layer.name().c_str());
670 Pass::add(PASS_BVH_INTERSECTIONS, passes,
"Debug BVH Intersections");
673 b_engine.add_pass(
"Debug Ray Bounces", 1,
"X", b_view_layer.name().c_str());
674 Pass::add(PASS_RAY_BOUNCES, passes,
"Debug Ray Bounces");
678 b_engine.add_pass(
"Debug Render Time", 1,
"X", b_view_layer.name().c_str());
682 b_engine.add_pass(
"Debug Sample Count", 1,
"X", b_view_layer.name().c_str());
686 b_engine.add_pass(
"VolumeDir", 3,
"RGB", b_view_layer.name().c_str());
689 if (
get_boolean(crl,
"use_pass_volume_indirect")) {
690 b_engine.add_pass(
"VolumeInd", 3,
"RGB", b_view_layer.name().c_str());
696 int crypto_depth =
divide_up(
min(16, b_view_layer.pass_cryptomatte_depth()), 2);
697 scene->
film->set_cryptomatte_depth(crypto_depth);
699 if (b_view_layer.use_pass_cryptomatte_object()) {
700 for (
int i = 0; i < crypto_depth; i++) {
702 b_engine.add_pass(passname.c_str(), 4,
"RGBA", b_view_layer.name().c_str());
707 if (b_view_layer.use_pass_cryptomatte_material()) {
708 for (
int i = 0; i < crypto_depth; i++) {
710 b_engine.add_pass(passname.c_str(), 4,
"RGBA", b_view_layer.name().c_str());
715 if (b_view_layer.use_pass_cryptomatte_asset()) {
716 for (
int i = 0; i < crypto_depth; i++) {
718 b_engine.add_pass(passname.c_str(), 4,
"RGBA", b_view_layer.name().c_str());
723 if (b_view_layer.use_pass_cryptomatte_accurate() && cryptomatte_passes !=
CRYPT_NONE) {
726 scene->
film->set_cryptomatte_passes(cryptomatte_passes);
728 if (adaptive_sampling) {
730 if (!
get_boolean(crl,
"pass_debug_sample_count")) {
735 BL::ViewLayer::aovs_iterator b_aov_iter;
736 for (b_view_layer.aovs.begin(b_aov_iter); b_aov_iter != b_view_layer.aovs.end(); ++b_aov_iter) {
737 BL::AOV b_aov(*b_aov_iter);
738 if (!b_aov.is_valid()) {
742 string name = b_aov.name();
743 bool is_color = b_aov.type() == BL::AOV::type_COLOR;
746 b_engine.add_pass(name.c_str(), 4,
"RGBA", b_view_layer.name().c_str());
750 b_engine.add_pass(name.c_str(), 1,
"X", b_view_layer.name().c_str());
756 scene->
film->set_denoising_clean_pass(scene->
film->get_denoising_flags() &
761 scene->
film->set_pass_alpha_threshold(b_view_layer.pass_alpha_threshold());
768 void BlenderSync::free_data_after_sync(
BL::Depsgraph &b_depsgraph)
775 const bool is_interface_locked = b_engine.render() && b_engine.render().use_lock_interface();
776 const bool is_persistent_data = b_engine.render() && b_engine.render().use_persistent_data();
777 const bool can_free_caches =
786 if (!can_free_caches) {
792 for (
BL::Object &b_ob : b_depsgraph.objects) {
793 b_ob.cache_release();
805 if (shadingsystem == 0)
807 else if (shadingsystem == 1)
810 if (background ||
DebugFlags().viewport_static_bvh)
826 texture_limit =
RNA_enum_get(&cscene,
"texture_limit_render");
831 if (texture_limit > 0 && b_scene.render().use_simplify()) {
832 params.texture_limit = 1 << (texture_limit + 6);
840 params.background = background;
850 return (background) ? false :
get_boolean(cscene,
"preview_pause");
854 BL::Preferences &b_preferences,
866 params.background = background;
873 int samples =
get_int(cscene,
"samples");
875 int preview_samples =
get_int(cscene,
"preview_samples");
876 int preview_aa_samples =
get_int(cscene,
"preview_aa_samples");
880 preview_aa_samples = preview_aa_samples * preview_aa_samples;
882 samples = samples * samples;
883 preview_samples = preview_samples * preview_samples;
886 if (
get_enum(cscene,
"progressive") == 0 &&
params.device.has_branched_path) {
891 params.samples = preview_aa_samples;
901 params.samples = preview_samples;
915 if (!is_cpu && !background) {
920 int debug_tile_size =
get_int(cscene,
"debug_tile_size");
925 int tile_x = b_engine.tile_x();
926 int tile_y = b_engine.tile_y();
939 params.denoising = get_denoise_params(b_scene, b_view_layer, background);
941 if (
params.denoising.use) {
944 params.device.add_denoising_devices(
params.denoising.type);
947 if (!(
params.device.denoisers &
params.denoising.type)) {
948 params.denoising.use =
false;
953 params.start_resolution =
get_int(cscene,
"preview_start_resolution");
954 params.pixel_size = b_engine.get_preview_pixel_size(b_scene);
962 BL::RenderSettings b_r = b_scene.render();
963 params.progressive_refine = b_engine.is_preview() ||
965 if (b_r.use_save_buffers() ||
params.adaptive_sampling)
966 params.progressive_refine =
false;
969 if (
params.progressive_refine)
970 params.progressive =
true;
972 params.progressive =
false;
974 params.start_resolution = INT_MAX;
978 params.progressive =
true;
983 if (shadingsystem == 0)
985 else if (shadingsystem == 1)
989 params.display_buffer_linear = b_engine.support_display_space_shader(b_scene);
991 if (b_engine.is_preview()) {
995 params.progressive_update_timeout = 0.1;
998 params.use_profiling =
params.device.has_profiling && !b_engine.is_preview() && background &&
1019 denoising.
use =
false;
1030 "denoising_openimagedenoise_input_passes",
1056 denoising.
use =
false;
typedef double(DMatrix)[4][4]
struct Depsgraph Depsgraph
struct ViewLayer ViewLayer
_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 GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_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 width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
struct RenderEngine RenderEngine
struct RenderLayer RenderLayer
struct RenderPass RenderPass
static CCL_NAMESPACE_BEGIN int aa_samples(Scene *scene, Object *object, ShaderEvalType type)
int blender_device_threads(BL::Scene &b_scene)
DeviceInfo blender_device_info(BL::Preferences &b_preferences, BL::Scene &b_scene, bool background)
#define MAP_OPTION(name, flag)
static CCL_NAMESPACE_BEGIN const char * cryptomatte_prefix
#define MAP_PASS(passname, passtype)
static float get_float(PointerRNA &ptr, const char *name)
static bool get_boolean(PointerRNA &ptr, const char *name)
static int get_int(PointerRNA &ptr, const char *name)
static int get_enum(PointerRNA &ptr, const char *name, int num_values=-1, int default_value=-1)
static Mesh::SubdivisionType object_subdivision_type(BL::Object &b_ob, bool preview, bool experimental)
PassType update_viewport_display_passes(BL::SpaceView3D &b_v3d, vector< Pass > &passes)
static unsigned long seed
static bool print_render_stats
static bool get_session_pause(BL::Scene &b_scene, bool background)
static SessionParams get_session_params(BL::RenderEngine &b_engine, BL::Preferences &b_userpref, BL::Scene &b_scene, bool background, BL::ViewLayer b_view_layer=BL::ViewLayer(PointerRNA_NULL))
void sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d)
BlenderSync(BL::RenderEngine &b_engine, BL::BlendData &b_data, BL::Scene &b_scene, Scene *scene, bool preview, Progress &progress)
static SceneParams get_scene_params(BL::Scene &b_scene, bool background)
vector< Pass > sync_render_passes(BL::Scene &b_scene, BL::RenderLayer &b_render_layer, BL::ViewLayer &b_view_layer, bool adaptive_sampling, const DenoiseParams &denoising)
static int get_denoising_pass(BL::RenderPass &b_pass)
static PassType get_pass_type(BL::RenderPass &b_pass)
void sync_data(BL::RenderSettings &b_render, BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, BL::Object &b_override, int width, int height, void **python_thread_state)
void reset(BL::BlendData &b_data, BL::Scene &b_scene)
void sync_view_layer(BL::SpaceView3D &b_v3d, BL::ViewLayer &b_view_layer)
static PassType get_viewport_display_render_pass(BL::SpaceView3D &b_v3d)
DenoiserInput input_passes
static vector< DeviceInfo > available_devices(uint device_type_mask=DEVICE_MASK_ALL)
void tag_passes_update(Scene *scene, const vector< Pass > &passes_, bool update_passes=true)
void tag_update(Scene *scene, uint32_t flag)
static NODE_DECLARE const int MAX_SAMPLES
static bool equals(const vector< Pass > &A, const vector< Pass > &B)
static void add(PassType type, vector< Pass > &passes, const char *name=NULL)
const map< K, T * > & key_to_scene_data()
void set_recalc(const BL::ID &id)
void post_sync(bool do_delete=true)
@ DENOISER_OPENIMAGEDENOISE
@ DENOISER_INPUT_RGB_ALBEDO_NORMAL
#define CCL_NAMESPACE_END
@ DENOISING_CLEAN_GLOSSY_IND
@ DENOISING_CLEAN_DIFFUSE_DIR
@ DENOISING_CLEAN_ALL_PASSES
@ DENOISING_CLEAN_TRANSMISSION_IND
@ DENOISING_CLEAN_DIFFUSE_IND
@ DENOISING_CLEAN_TRANSMISSION_DIR
@ DENOISING_CLEAN_GLOSSY_DIR
@ PASS_TRANSMISSION_DIRECT
@ PASS_TRANSMISSION_COLOR
@ PASS_TRANSMISSION_INDIRECT
@ PASS_ADAPTIVE_AUX_BUFFER
@ DENOISING_PASS_PREFILTERED_VARIANCE
@ DENOISING_PASS_PREFILTERED_NORMAL
@ DENOISING_PASS_PREFILTERED_SHADOWING
@ DENOISING_PASS_PREFILTERED_DEPTH
@ DENOISING_PASS_PREFILTERED_ALBEDO
@ DENOISING_PASS_PREFILTERED_COLOR
@ DENOISING_PASS_PREFILTERED_INTENSITY
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
BakeManager * bake_manager
DebugFlags & DebugFlags()
ccl_device_inline uint hash_uint2(uint kx, uint ky)
static CCL_NAMESPACE_BEGIN bool openimagedenoise_supported()
bool string_startswith(const string &s, const char *start)
CCL_NAMESPACE_BEGIN string string_printf(const char *format,...)
ccl_device_inline size_t divide_up(size_t x, size_t y)