hsr-optimizer
hsr-optimizer copied to clipboard
[Bug] Wgsl integer overflow calculating head index
Repro
See: https://discord.com/channels/800607517074784256/1278037636870570108/1353390616456724523
Goal
Fix this calculation https://github.com/fribbels/hsr-optimizer/blob/78426a585d1dfde004c092e761b5cf0150a1bef4/src/lib/gpu/wgsl/computeShader.wgsl#L87 for the hand index.
Currently we're limited to 2147483647 for the product of hands*body*feet*sphere*rope size (which is still a lot) and realistically won't be reached unless you're optimizing for +0s. Change the expression to not exceed integer limits