Blender  V2.93
integrator.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2013 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __INTEGRATOR_H__
18 #define __INTEGRATOR_H__
19 
20 #include "kernel/kernel_types.h"
21 
22 #include "graph/node.h"
23 
25 
26 class Device;
27 class DeviceScene;
28 class Scene;
29 
30 class Integrator : public Node {
31  public:
33 
34  NODE_SOCKET_API(int, min_bounce)
35  NODE_SOCKET_API(int, max_bounce)
36 
37  NODE_SOCKET_API(int, max_diffuse_bounce)
38  NODE_SOCKET_API(int, max_glossy_bounce)
39  NODE_SOCKET_API(int, max_transmission_bounce)
40  NODE_SOCKET_API(int, max_volume_bounce)
41 
42  NODE_SOCKET_API(int, transparent_min_bounce)
43  NODE_SOCKET_API(int, transparent_max_bounce)
44 
45  NODE_SOCKET_API(int, ao_bounces)
46 
47  NODE_SOCKET_API(int, volume_max_steps)
48  NODE_SOCKET_API(float, volume_step_rate)
49 
50  NODE_SOCKET_API(bool, caustics_reflective)
51  NODE_SOCKET_API(bool, caustics_refractive)
52  NODE_SOCKET_API(float, filter_glossy)
53 
54  NODE_SOCKET_API(int, seed)
55 
56  NODE_SOCKET_API(float, sample_clamp_direct)
57  NODE_SOCKET_API(float, sample_clamp_indirect)
58  NODE_SOCKET_API(bool, motion_blur)
59 
60  /* Maximum number of samples, beyond which we are likely to run into
61  * precision issues for sampling patterns. */
62  static const int MAX_SAMPLES = (1 << 24);
63 
65  NODE_SOCKET_API(int, diffuse_samples)
66  NODE_SOCKET_API(int, glossy_samples)
67  NODE_SOCKET_API(int, transmission_samples)
68  NODE_SOCKET_API(int, ao_samples)
69  NODE_SOCKET_API(int, mesh_light_samples)
70  NODE_SOCKET_API(int, subsurface_samples)
71  NODE_SOCKET_API(int, volume_samples)
72  NODE_SOCKET_API(int, start_sample)
73 
74  NODE_SOCKET_API(bool, sample_all_lights_direct)
75  NODE_SOCKET_API(bool, sample_all_lights_indirect)
76  NODE_SOCKET_API(float, light_sampling_threshold)
77 
78  NODE_SOCKET_API(int, adaptive_min_samples)
79  NODE_SOCKET_API(float, adaptive_threshold)
80 
81  enum Method {
83  PATH = 1,
84 
86  };
87 
88  NODE_SOCKET_API(Method, method)
89 
90  NODE_SOCKET_API(SamplingPattern, sampling_pattern)
91 
92  enum : uint32_t {
93  AO_PASS_MODIFIED = (1 << 0),
96 
97  /* tag everything in the manager for an update */
98  UPDATE_ALL = ~0u,
99 
101  };
102 
103  Integrator();
104  ~Integrator();
105 
106  void device_update(Device *device, DeviceScene *dscene, Scene *scene);
107  void device_free(Device *device, DeviceScene *dscene, bool force_free = false);
108 
109  void tag_update(Scene *scene, uint32_t flag);
110 };
111 
113 
114 #endif /* __INTEGRATOR_H__ */
static CCL_NAMESPACE_BEGIN int aa_samples(Scene *scene, Object *object, ShaderEvalType type)
Definition: bake.cpp:29
static unsigned long seed
Definition: btSoftBody.h:39
Definition: device.h:293
@ BRANCHED_PATH
Definition: integrator.h:82
void tag_update(Scene *scene, uint32_t flag)
Definition: integrator.cpp:292
void device_update(Device *device, DeviceScene *dscene, Scene *scene)
Definition: integrator.cpp:107
void device_free(Device *device, DeviceScene *dscene, bool force_free=false)
Definition: integrator.cpp:287
@ LIGHT_SAMPLES_MODIFIED
Definition: integrator.h:95
@ AO_PASS_MODIFIED
Definition: integrator.h:93
@ BACKGROUND_AO_MODIFIED
Definition: integrator.h:94
static NODE_DECLARE const int MAX_SAMPLES
Definition: integrator.h:62
Scene scene
#define CCL_NAMESPACE_END
SamplingPattern
Definition: kernel_types.h:254
#define NODE_SOCKET_API(type_, name)
Definition: node.h:63
#define NODE_DECLARE
Definition: node_type.h:148
unsigned int uint32_t
Definition: stdint.h:83
Definition: node.h:98