Skip to content

Conversation

NaridaL
Copy link

@NaridaL NaridaL commented Sep 18, 2021

…hould cause fewer issues than the other way around.

…hould cause fewer issues than the other way around.
@NaridaL
Copy link
Author

NaridaL commented Sep 18, 2021

Currently glslify is incompatible with WebGL2 as keywords and functions such as uvec2 and texture2D are renamed.

See also glslify/glslify#103

@mseddon
Copy link

mseddon commented Mar 17, 2024

It appears glslify is dead. Did you find an alternative?

@NaridaL
Copy link
Author

NaridaL commented Mar 17, 2024

@mseddon I just ended up writing a simple webpack loader:

https://github.com/NaridaL/workshop/blob/5cc1b789c367953e53e4673871cce32edbe62b6c/glsl-loader.mjs#L15

Basically all it does is look for lines like #pragma webpack include <relativepath>, get the file content from webpack and do a simple string replace.

It's a lot more basic than this because it doesn't attempt to remap/rename tokens but it worked fine for my case and it supports hotloading.

Feel free to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants