Clamps MSAA samples to valid power-of-2 values.
Non-numeric / NaN / Infinity inputs default to 0 (MSAA disabled). Without the type/finite guard, NaN and string injection from corrupted localStorage / zarr config would fall through every <= comparison and silently return 16.
<=
Requested sample count
Valid sample count (0, 2, 4, 8, 16)
Clamps MSAA samples to valid power-of-2 values.
Non-numeric / NaN / Infinity inputs default to 0 (MSAA disabled). Without the type/finite guard, NaN and string injection from corrupted localStorage / zarr config would fall through every
<=comparison and silently return 16.