leakec / sihm

Standalone Interactive HTML Movie (SIHM): A highly-portable, interactive way to visualize your simulations.
https://leakec.github.io/sihm/
MIT License
1 stars 0 forks source link

glslify does not work as expected with webpack #14

Closed leakec closed 1 year ago

leakec commented 1 year ago

I'm having issues compiling shaders that use glslify code. I believe this is related to what is happening here. I think my best bet at this point is to convert the code before saving it in the SIHM_* file.

leakec commented 1 year ago

I think the solution here is just to run glslify via the command line before compiling index.js to main.js. All this command does is replace the proper pragmas, so we can run it on our custom SIHM_* files with no issue.

leakec commented 1 year ago

This is very close to working. Just need a way to automate putting the #DEFINE(s) in a different line other than the first.

leakec commented 1 year ago

Got this working as of 2f4ec620cc5421e884eed7791f751652f51fe5e4.