Skip to content

Commit

Permalink
tools: Make ETC baseline opt in in gltfbasis
Browse files Browse the repository at this point in the history
These baselines are very helpful to analyze a small set of files but
very distracting on a large set of files, so make this opt in via a
command line argument.
  • Loading branch information
zeux committed Jun 21, 2024
1 parent a336c34 commit 68ebd47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/gltfbasis.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
argp = argparse.ArgumentParser()
argp.add_argument('--basisu', type=str, required=True)
argp.add_argument('--graph', type=str, default="basisu.png")
argp.add_argument('--etcbase', action='store_true')
argp.add_argument('files', type=str, nargs='+')
args = argp.parse_args()

Expand Down Expand Up @@ -55,11 +56,11 @@ def stats(path):
for path in args.files:
print('Processing', path)
results = stats(path)
etcbase = compress(path, ["-q", "192"])
etcbase = compress(path, ["-q", "192"]) if args.etcbase else None

for idx, field in enumerate(fields):
line, = axs[idx].plot([r['rdo_l'] for r in results], [r[field] for r in results])
if field in etcbase:
if etcbase and field in etcbase:
axs[idx].axhline(etcbase[field], color=line.get_color(), linestyle='dotted')
if idx == 0:
lines.append(line)
Expand Down

0 comments on commit 68ebd47

Please sign in to comment.