projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.22k stars 365 forks source link

Modify NaN propagation for multiplication #779

Closed dpw13 closed 4 months ago

dpw13 commented 4 months ago

This solves some edge cases in presets that suppress NaN or infinities by multiplying by zero. It's not clear what the performance impact is with this change, and it may not be something we want to always enable. Because of that, I've added an option flag to GLSLGenerator::Generate() to enable or disable the behavior. This may be something we don't want to end up merging if the performance impact is too high.