Last active
December 20, 2022 02:19
-
-
Save zeux/1ebc5e04030a681f7957ded0f5957015 to your computer and use it in GitHub Desktop.
Gather best meshlet configurations (from the topology perspective) for each meshlet size limit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tl = 512 | |
for vl in [32, 64, 96, 128, 256]: | |
bestx = 0 | |
besty = 0 | |
bests = vl | |
for x in range(1, vl): | |
for y in range(1, vl): | |
v = (x+1)*(y+1) | |
t = 2*x*y | |
p = 2*(x+y) | |
s = p / t | |
if v <= vl and t <= tl and bests > s: | |
bestx = x | |
besty = y | |
bestv = v | |
bestt = t | |
bestp = p | |
bests = s | |
print("v limit", vl, ": best", bestx, "x", besty, "v", bestv, "t", bestt, "p", bestp, "; p/t", "%.02f" % (bestp/bestt), "acmr", "%.02f" % (bestv/bestt)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment