Fix #109302: baking UDIM displacement normalization wrong #109409
|
@ -611,11 +611,7 @@ static void do_multires_bake(MultiresBakeRender *bkr,
|
|||
do_multires_bake_thread(&handles[0]);
|
||||
}
|
||||
|
||||
/* construct bake result */
|
||||
result->height_min = handles[0].height_min;
|
||||
result->height_max = handles[0].height_max;
|
||||
|
||||
|
||||
for (i = 1; i < tot_thread; i++) {
|
||||
for (i = 0; i < tot_thread; i++) {
|
||||
result->height_min = min_ff(result->height_min, handles[i].height_min);
|
||||
result->height_max = max_ff(result->height_max, handles[i].height_max);
|
||||
}
|
||||
|
@ -1472,6 +1468,10 @@ static void bake_images(MultiresBakeRender *bkr, MultiresBakeResult *result)
|
|||
{
|
||||
LinkData *link;
|
||||
|
||||
/* construct bake result */
|
||||
result->height_min = FLT_MAX;
|
||||
result->height_max = -FLT_MAX;
|
||||
|
||||
Brecht Van Lommel
commented
This should be outside the loop over images, otherwise it will use the height from the last image for all images. This should be outside the loop over images, otherwise it will use the height from the last image for all images.
Philipp Oeser
commented
Yeah, I stumbled over this as well, but left it alone because this was always the case afaict and would mean a change in behavior (a good one though, so will change...) Yeah, I stumbled over this as well, but left it alone because this was always the case afaict and would mean a change in behavior (a good one though, so will change...)
|
||||
for (link = static_cast<LinkData *>(bkr->image.first); link; link = link->next) {
|
||||
Image *ima = (Image *)link->data;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
The loop below needs to be changed to: