Merge branch 'blender-v4.3-release'
This commit is contained in:
@@ -69,7 +69,7 @@ ccl_device float3 phase_rayleigh_sample(float3 D, float2 rand, ccl_private float
|
||||
}
|
||||
|
||||
/* Given cosine between rays, return probability density that a photon bounces to that direction
|
||||
* according to the Draine phase function. This is a generalisation of the Henyey-Greenstein
|
||||
* according to the Draine phase function. This is a generalization of the Henyey-Greenstein
|
||||
* function which bridges the cases of HG and Rayleigh scattering. The parameter g mainly controls
|
||||
* the first moment <cos theta>, and alpha the second moment <cos2 theta> of the exact phase
|
||||
* function. alpha=0 reduces to HG function, g=0, alpha=1 reduces to Rayleigh function, alpha=1
|
||||
@@ -91,7 +91,7 @@ ccl_device float phase_draine(float cos_theta, float g, float alpha)
|
||||
((1 + (alpha * (1 + 2 * g2)) * (1 / 3.0f)) * M_4PI_F * fac * sqrtf(fac));
|
||||
}
|
||||
|
||||
/* Adapted from the hlsl code provided in https://research.nvidia.com/labs/rtr/approximate-mie/ */
|
||||
/* Adapted from the HLSL code provided in https://research.nvidia.com/labs/rtr/approximate-mie/ */
|
||||
ccl_device float phase_draine_sample_cos(float g, float alpha, float rand)
|
||||
{
|
||||
const float g2 = sqr(g), g3 = g * g2, g4 = sqr(g2), g6 = g2 * g4;
|
||||
|
||||
@@ -25,8 +25,8 @@ shader node_scatter_volume(string phase = "Henyey-Greenstein",
|
||||
scatter = rayleigh();
|
||||
}
|
||||
else if (phase == "Mie") {
|
||||
/* Approxmiation of Mie phase function for water droplets using a mix of Draine and H-G.
|
||||
* See kernel/svm/closure.h for details. */
|
||||
/* Approximation of Mie phase function for water droplets using a mix of Draine and H-G.
|
||||
* See `kernel/svm/closure.h` for details. */
|
||||
float d = max(Diameter, 2.0);
|
||||
float aniso_hg = exp(-0.0990567 / (d - 1.67154));
|
||||
float aniso_d = exp(-2.20679 / (d + 3.91029) - 0.428934);
|
||||
|
||||
@@ -639,7 +639,7 @@ ccl_device_inline float fast_inv_cbrtf(float x)
|
||||
{
|
||||
util_assert(x >= 0.0f);
|
||||
|
||||
/* Constant is roughly cbrt(2^127), but tweaked a bit to balance the error across the entire
|
||||
/* Constant is roughly `cbrt(2^127)`, but tweaked a bit to balance the error across the entire
|
||||
* range. The exact value is not critical. */
|
||||
float y = __int_as_float(0x54a24242 - __float_as_int(x) / 3);
|
||||
y = (2.0f / 3) * y + 1 / (3 * y * y * x);
|
||||
|
||||
@@ -144,7 +144,7 @@ int64_t av_get_frame_duration_in_pts_units(const AVFrame *picture)
|
||||
|
||||
FFMPEG_INLINE size_t ffmpeg_get_buffer_alignment()
|
||||
{
|
||||
/* Note: even if av_frame_get_buffer suggests to pass 0 for alignment,
|
||||
/* NOTE: even if av_frame_get_buffer suggests to pass 0 for alignment,
|
||||
* as of ffmpeg 6.1/7.0 it does not use correct alignment for AVX512
|
||||
* CPU (frame.c get_video_buffer ends up always using 32 alignment,
|
||||
* whereas it should have used 64). Reported upstream:
|
||||
|
||||
@@ -58,7 +58,7 @@ enum {
|
||||
};
|
||||
|
||||
/* NOTE: These three structs are currently exposed in header to allow for their usage in RNA.
|
||||
* Regualr C++ code should not access their content directly.
|
||||
* Regular C++ code should not access their content directly.
|
||||
*
|
||||
* TODO: Refactor these three structs into classes, and integrated the whole API into them. */
|
||||
struct BlendfileLinkAppendContext;
|
||||
|
||||
@@ -292,16 +292,16 @@ void BKE_main_init(Main &bmain);
|
||||
* This is similar to a call to #BKE_main_destroy followed by #BKE_main_init, however the internal
|
||||
* #Main::lock is kept unchanged, and the #Main::is_global_main flag is not reset to `true` either.
|
||||
*
|
||||
* \note: Unlike #BKE_main_free, only process the given \a bmain, without handling any potential
|
||||
* \note Unlike #BKE_main_free, only process the given \a bmain, without handling any potential
|
||||
* other linked Main.
|
||||
*/
|
||||
void BKE_main_clear(Main &bmain);
|
||||
/**
|
||||
* Clear and free all data in given \a bmain, but does not free \a bmain itself.
|
||||
*
|
||||
* \note: In most cases, #BKE_main_free should be used instead of this function.
|
||||
* \note In most cases, #BKE_main_free should be used instead of this function.
|
||||
*
|
||||
* \note: Unlike #BKE_main_free, only process the given \a bmain, without handling any potential
|
||||
* \note Unlike #BKE_main_free, only process the given \a bmain, without handling any potential
|
||||
* other linked Main.
|
||||
*/
|
||||
void BKE_main_destroy(Main &bmain);
|
||||
|
||||
@@ -1036,7 +1036,7 @@ static void legacy_gpencil_to_grease_pencil(ConversionData &conversion_data,
|
||||
|
||||
/* Second loop, to write to layer attributes after all layers were created. */
|
||||
MutableAttributeAccessor layer_attributes = grease_pencil.attributes_for_write();
|
||||
/* Note: Layer Adjustments like the tint and the radius offsets are deliberatly ignored here!
|
||||
/* NOTE: Layer Adjustments like the tint and the radius offsets are deliberately ignored here!
|
||||
* These are converted to modifiers at the bottom of the stack to keep visual compatibility with
|
||||
* GPv2. */
|
||||
SpanAttributeWriter<int> layer_passes = layer_attributes.lookup_or_add_for_write_span<int>(
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace blender {
|
||||
* sure that only one thread can modify a value at a time. Multiple threads may read from the same
|
||||
* key at the same time though.
|
||||
*
|
||||
* \note: #ConcurrentMap does not support iteration over all values.
|
||||
* \note #ConcurrentMap does not support iteration over all values.
|
||||
*
|
||||
* This is a thin wrapper around #tbb::concurrent_hash_map that also has a fallback implementation
|
||||
* if TBB is not available. The fallback implementation is not optimized for performance. It mainly
|
||||
|
||||
@@ -1712,7 +1712,7 @@ static void switch_endian_structs(const SDNA *filesdna, BHead *bhead)
|
||||
* Generate the final allocation string reference for read blocks of data. If \a blockname is
|
||||
* given, use it as 'owner block' info, otherwise use the id type index to get that info.
|
||||
*
|
||||
* \note: These strings are stored until Blender exits
|
||||
* \note These strings are stored until Blender exits
|
||||
*/
|
||||
static const char *get_alloc_name(FileData *fd,
|
||||
BHead *bh,
|
||||
|
||||
@@ -3962,7 +3962,7 @@ static void join_object_with_active(Main &bmain,
|
||||
/* Rename animation paths to layers. */
|
||||
BKE_fcurves_main_cb(&bmain, [&](ID *id, FCurve *fcu) {
|
||||
if (id == &grease_pencil_src.id && fcu->rna_path && strstr(fcu->rna_path, "layers[")) {
|
||||
/* Have to use linear search, the layer name map only contains substrings of RNA paths. */
|
||||
/* Have to use linear search, the layer name map only contains sub-strings of RNA paths. */
|
||||
for (auto [name_src, name_dst] : layer_name_map.items()) {
|
||||
if (name_dst != name_src) {
|
||||
const char *old_path = fcu->rna_path;
|
||||
|
||||
@@ -4137,7 +4137,7 @@ void ui_block_cm_to_display_space_v3(uiBlock *block, float pixel[3])
|
||||
/**
|
||||
* Factory function: Allocate button and set #uiBut.type.
|
||||
*
|
||||
* \note: #ui_but_mem_delete is the matching 'destructor' function.
|
||||
* \note #ui_but_mem_delete is the matching 'destructor' function.
|
||||
*/
|
||||
static uiBut *ui_but_new(const eButType type)
|
||||
{
|
||||
|
||||
@@ -4909,7 +4909,7 @@ static void restore_from_undo_step_if_necessary(const Depsgraph &depsgraph,
|
||||
* rather than in the brush deformation calculation because that is called once for each symmetry
|
||||
* pass, potentially within the same BVH node.
|
||||
*
|
||||
* Note: Despite the Cloth and Boundary brush using original coordinates, the brushes do not
|
||||
* NOTE: Despite the Cloth and Boundary brush using original coordinates, the brushes do not
|
||||
* expect this restoration to happen on every stroke step. Performing this restoration causes
|
||||
* issues with the cloth simulation mode for those brushes.
|
||||
*/
|
||||
|
||||
@@ -248,7 +248,7 @@ static bke::CurvesGeometry join_curves_ranges(const bke::CurvesGeometry &src_cur
|
||||
bke::CurvesGeometry dst_curves = bke::CurvesGeometry(src_curves.points_num(),
|
||||
old_curves_by_new.size());
|
||||
|
||||
/* Note: using the offsets as an index map means the first curve of each range is used for
|
||||
/* NOTE: using the offsets as an index map means the first curve of each range is used for
|
||||
* attributes. */
|
||||
const Span<int> old_by_new_map = old_curves_by_new.data().drop_back(1);
|
||||
bke::gather_attributes(src_curves.attributes(),
|
||||
|
||||
@@ -127,7 +127,7 @@ TEST(imbuf_scaling, bilinear_2x_smaller)
|
||||
{
|
||||
ImBuf *res = scale_2x_smaller(false, false);
|
||||
const uchar4 *got = reinterpret_cast<uchar4 *>(res->byte_buffer.data);
|
||||
/* Note: IMB_transform results in (191, 128, 64, 255), <same>,
|
||||
/* NOTE: #IMB_transform results in (191, 128, 64, 255), <same>,
|
||||
* (55, 50, 48, 254) i.e. different rounding. */
|
||||
EXPECT_EQ(uint4(got[0]), uint4(191, 127, 63, 255));
|
||||
EXPECT_EQ(uint4(got[1]), uint4(133, 55, 31, 16));
|
||||
|
||||
@@ -99,8 +99,8 @@ Mesh *convert_ply_to_mesh(PlyData &data, const PLYImportParams ¶ms)
|
||||
uv_map.finish();
|
||||
}
|
||||
|
||||
/* If we have custom vertex normals, set them (note: important to do this
|
||||
* after initializing the loops). */
|
||||
/* If we have custom vertex normals, set them
|
||||
* (NOTE: important to do this after initializing the loops). */
|
||||
bool set_custom_normals_for_verts = false;
|
||||
if (!data.vertex_normals.is_empty()) {
|
||||
if (!data.face_sizes.is_empty()) {
|
||||
|
||||
@@ -564,7 +564,7 @@ typedef struct GreasePencil {
|
||||
|
||||
/**
|
||||
* Adds multiple layers with an empty name.
|
||||
* Note: Evaluated Grease Pencil geometry is allowed to have layers with the same name.
|
||||
* NOTE: Evaluated Grease Pencil geometry is allowed to have layers with the same name.
|
||||
*/
|
||||
void add_layers_for_eval(int num_new_layers);
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ void ThumbGenerationJob::run_fn(void *customdata, wmJobWorkerStatus *worker_stat
|
||||
Vector<ThumbnailCache::Request> requests;
|
||||
while (!worker_status->stop) {
|
||||
/* Under cache mutex lock: copy all current requests into a vector for processing.
|
||||
* Note: keep the requests set intact! We don't want to add new requests for same
|
||||
* NOTE: keep the requests set intact! We don't want to add new requests for same
|
||||
* items while we are processing them. They will be removed from the set once
|
||||
* they are finished, one by one. */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user