Browse Source

Fix edge case (fixes #1214).

pull/1238/head
Matthew Petroff 6 months ago
parent
commit
1c7e9f6f71
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      utils/multires/generate.py

+ 1
- 1
utils/multires/generate.py View File

@@ -197,7 +197,7 @@ else:
cubeSize = 8 * int((360 / haov) * origWidth / math.pi / 8) cubeSize = 8 * int((360 / haov) * origWidth / math.pi / 8)
tileSize = min(args.tileSize, cubeSize) tileSize = min(args.tileSize, cubeSize)
levels = int(math.ceil(math.log(float(cubeSize) / tileSize, 2))) + 1 levels = int(math.ceil(math.log(float(cubeSize) / tileSize, 2))) + 1
if round(cubeSize / 2**(levels - 2)) == tileSize:
if int(cubeSize / 2**(levels - 2)) == tileSize:
levels -= 1 # Handle edge case levels -= 1 # Handle edge case
origHeight = str(origHeight) origHeight = str(origHeight)
origWidth = str(origWidth) origWidth = str(origWidth)


Loading…
Cancel
Save