69 const Array &advected_field,
74 bool post_filter =
true,
75 float post_filter_sigma = 0.125f,
76 float advection_length = 0.1f,
77 float value_persistence = 0.99f,
79 const Array *p_advection_mask =
nullptr,
80 const Array *p_mask =
nullptr);
85 const std::vector<const Array *> &advected_fields,
90 bool post_filter =
true,
91 float post_filter_sigma = 0.125f,
92 float advection_length = 0.1f,
93 float value_persistence = 0.99f,
95 const Array *p_advection_mask =
nullptr,
96 const Array *p_mask =
nullptr);
100 const std::vector<Array> &advected_fields,
104 bool reverse =
false,
105 bool post_filter =
true,
106 float post_filter_sigma = 0.125f,
107 float advection_length = 0.1f,
108 float value_persistence = 0.99f,
110 const Array *p_advection_mask =
nullptr,
111 const Array *p_mask =
nullptr);
115 const Array &advected_field,
118 bool reverse =
false,
119 bool post_filter =
true,
120 float post_filter_sigma = 0.125f,
121 float advection_length = 0.1f,
122 float value_persistence = 0.99f,
124 const Array *p_advection_mask =
nullptr,
125 const Array *p_mask =
nullptr);
130 const std::vector<const Array *> &advected_fields,
133 bool reverse =
false,
134 bool post_filter =
true,
135 float post_filter_sigma = 0.125f,
136 float advection_length = 0.1f,
137 float value_persistence = 0.99f,
139 const Array *p_advection_mask =
nullptr,
140 const Array *p_mask =
nullptr);
144 const std::vector<Array> &advected_fields,
147 bool reverse =
false,
148 bool post_filter =
true,
149 float post_filter_sigma = 0.125f,
150 float advection_length = 0.1f,
151 float value_persistence = 0.99f,
153 const Array *p_advection_mask =
nullptr,
154 const Array *p_mask =
nullptr);
159 const Array &advected_field,
162 bool reverse =
false,
163 bool post_filter =
true,
164 float post_filter_sigma = 0.125f,
165 float advection_length = 0.1f,
166 float value_persistence = 0.99f,
168 const Array *p_advection_mask =
nullptr,
169 const Array *p_mask =
nullptr);
175 const std::vector<const Array *> &advected_fields,
178 bool reverse =
false,
179 bool post_filter =
true,
180 float post_filter_sigma = 0.125f,
181 float advection_length = 0.1f,
182 float value_persistence = 0.99f,
184 const Array *p_advection_mask =
nullptr,
185 const Array *p_mask =
nullptr);
190 const std::vector<Array> &advected_fields,
193 bool reverse =
false,
194 bool post_filter =
true,
195 float post_filter_sigma = 0.125f,
196 float advection_length = 0.1f,
197 float value_persistence = 0.99f,
199 const Array *p_advection_mask =
nullptr,
200 const Array *p_mask =
nullptr);
204 const Texture &texture,
208 bool reverse =
false,
209 bool post_filter =
true,
210 float post_filter_sigma = 0.125f,
211 float advection_length = 0.1f,
212 float value_persistence = 0.99f,
214 const Array *p_advection_mask =
nullptr,
215 const Array *p_mask =
nullptr);
219 const Texture &texture,
222 bool reverse =
false,
223 bool post_filter =
true,
224 float post_filter_sigma = 0.125f,
225 float advection_length = 0.1f,
226 float value_persistence = 0.99f,
228 const Array *p_advection_mask =
nullptr,
229 const Array *p_mask =
nullptr);
260 const Array &advected_field,
262 const std::vector<int> &steps_per_level = {4, 2, 1},
263 float particles_ratio = 0.5f,
264 float advection_length = 0.1f,
265 float value_persistence = 0.99f,
269 bool reverse =
false,
270 bool post_filter =
true,
271 float post_filter_sigma = 0.125f,
272 const Array *p_advection_mask =
nullptr,
273 const Array *p_mask =
nullptr);
278 const std::vector<const Array *> &advected_fields,
280 const std::vector<int> &steps_per_level = {4, 2, 1},
281 float particles_ratio = 0.5f,
282 float advection_length = 0.1f,
283 float value_persistence = 0.99f,
287 bool reverse =
false,
288 bool post_filter =
true,
289 float post_filter_sigma = 0.125f,
290 const Array *p_advection_mask =
nullptr,
291 const Array *p_mask =
nullptr);
296 const std::vector<Array> &advected_fields,
298 const std::vector<int> &steps_per_level = {4, 2, 1},
299 float particles_ratio = 0.5f,
300 float advection_length = 0.1f,
301 float value_persistence = 0.99f,
305 bool reverse =
false,
306 bool post_filter =
true,
307 float post_filter_sigma = 0.125f,
308 const Array *p_advection_mask =
nullptr,
309 const Array *p_mask =
nullptr);
314 const Texture &texture,
316 const std::vector<int> &steps_per_level = {4, 2, 1},
317 float particles_ratio = 0.5f,
318 float advection_length = 0.1f,
319 float value_persistence = 0.99f,
323 bool reverse =
false,
324 bool post_filter =
true,
325 float post_filter_sigma = 0.125f,
326 const Array *p_advection_mask =
nullptr,
327 const Array *p_mask =
nullptr);
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
A class to represent a multi-channel texture using planar hmap::Array storage.
Definition texture.hpp:37
Definition array_blending.hpp:225
Array advection_particle(const Array &z, const Array &advected_field, int iterations, int nparticles, std::uint32_t seed, bool reverse=false, bool post_filter=true, float post_filter_sigma=0.125f, float advection_length=0.1f, float value_persistence=0.99f, float inertia=0.f, const Array *p_advection_mask=nullptr, const Array *p_mask=nullptr)
Performs particle-based advection on a scalar field.
Definition advection_particle_gpu.cpp:25
void warp(Array &array, const Array *p_dx, const Array *p_dy)
See hmap::warp.
Definition warp_gpu.cpp:16
Array advection_particle_multiscale(const Array &z, const Array &advected_field, std::uint32_t seed, const std::vector< int > &steps_per_level={4, 2, 1}, float particles_ratio=0.5f, float advection_length=0.1f, float value_persistence=0.99f, float inertia=0.f, float mix=1.f, float warp=0.f, bool reverse=false, bool post_filter=true, float post_filter_sigma=0.125f, const Array *p_advection_mask=nullptr, const Array *p_mask=nullptr)
Performs multiscale particle-based advection on a scalar field.
Definition advection_particle_gpu.cpp:498
Texture mix(const Texture &tex1, const Texture &tex2, MixMethod method=MM_SQRT_AVG)
Mix two textures into an output texture.
Definition colorize.cpp:561