I doubt that would be helpful. The main goal of the Javascript minifier is to reduce the size of the source file so that the client has less data to download, which speeds up the site. However, since the user will download the HLSL code, they will not see any performance benefits.
If you tune in to minimize the source, such a thing would be trivial to implement. Just write a script in your language of choice to replace newlines with a space and multiple spaces with one space (I don't know HLSL, but this should work, since it looks like C). If you want to see a well-written example, check out the C source for JSMin .
source share