Skip to content

Commit 745ab2c

Browse files
committedNov 15, 2024·
fix(xbilparser): apply zmin / zmax for any texture subsampling size
1 parent 0499f95 commit 745ab2c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed
 

‎src/Parser/XbilParser.js

+10-9
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,17 @@ export function computeMinMaxElevation(texture, pitch, options) {
6464
}
6565
}
6666
}
67-
// Clamp values to zmin and zmax values configured in ElevationLayer
68-
if (options.zmin != null) {
69-
if (min < options.zmin) { min = options.zmin; }
70-
if (max < options.zmin) { max = options.zmin; }
71-
}
67+
}
7268

73-
if (options.zmax != null) {
74-
if (min > options.zmax) { min = options.zmax; }
75-
if (max > options.zmax) { max = options.zmax; }
76-
}
69+
// Clamp values to zmin and zmax values configured in ElevationLayer
70+
if (options.zmin != null) {
71+
if (min < options.zmin) { min = options.zmin; }
72+
if (max < options.zmin) { max = options.zmin; }
73+
}
74+
75+
if (options.zmax != null) {
76+
if (min > options.zmax) { min = options.zmax; }
77+
if (max > options.zmax) { max = options.zmax; }
7778
}
7879

7980
if (max === -Infinity || min === Infinity) {

0 commit comments

Comments
 (0)
Please sign in to comment.