浏览代码

Fix edge case with multires tiles.

Previously, one could generate a tile set that had the second level resolution
equal to the tile resolution, so it only had one tile per face.
pull/846/head
Matthew Petroff 5 年前
父节点
当前提交
6fd8a09710
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      utils/multires/generate.py

+ 2
- 0
utils/multires/generate.py 查看文件

@@ -132,6 +132,8 @@ else:
cubeSize = 8 * int((360 / haov) * origWidth / math.pi / 8)
tileSize = min(args.tileSize, cubeSize)
levels = int(math.ceil(math.log(float(cubeSize) / tileSize, 2))) + 1
if round(cubeSize / 2**(levels - 2)) == tileSize:
levels -= 1 # Handle edge case
origHeight = str(origHeight)
origWidth = str(origWidth)
origFilename = os.path.join(os.getcwd(), args.inputFile)


正在加载...
取消
保存