2 ms·
This makes so much sense to me! I once ended up using a similar approach for a small project at work[0]. It's a tool for cleaning up automatically generated sh
by Agentlien 2y ago
This makes so much sense to me!
I once ended up using a similar approach for a small project at work[0]. It's a tool for cleaning up automatically generated shader files to make them easier to read and optimize. It works entirely by running a series of regex replacements in succession. I very quickly found that picking the order of these passes allowed me to create a lot more opportunities for improvements because I could make more assumptions about the form and patterns of the code. It also really helped that the original generated code was very formulaic.
[0] https://github.com/Agentlien/ShaderCleanup https://github.com/Agentlien/ShaderCleanup