mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
further fix to pfmFile.resize()
This commit is contained in:
parent
210780f021
commit
41fa3c52e3
@ -69,7 +69,6 @@ FUNCTION_NAME(IMAGETYPE &dest, const IMAGETYPE &source,
|
||||
filter, filter_width, actual_width);
|
||||
|
||||
for (a = 0; a < dest.ASIZE(); a++) {
|
||||
nassertv(!isnan(temp_dest[a]) && !isnan(temp_dest_weight[a]));
|
||||
matrix[a][b] = temp_dest[a];
|
||||
matrix_weight[a][b] = temp_dest_weight[a];
|
||||
}
|
||||
@ -95,10 +94,10 @@ FUNCTION_NAME(IMAGETYPE &dest, const IMAGETYPE &source,
|
||||
filter, filter_width, actual_width);
|
||||
|
||||
for (b = 0; b < dest.BSIZE(); b++) {
|
||||
nassertv(!isnan(temp_dest[b]) && !isnan(temp_dest_weight[b]));
|
||||
if (temp_dest_weight[b] != 0) {
|
||||
dest.SETVAL(a, b, channel, (float)temp_dest[b]/(float)temp_dest_weight[b]);
|
||||
nassertv(!isnan(dest.GETVAL(a, b, channel)));
|
||||
// The temp_dest array has already been scaled by
|
||||
// temp_dest_weight; we don't scale it again here.
|
||||
dest.SETVAL(a, b, channel, (float)temp_dest[b]/(float)source_max);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user