Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modularize shaders #4

Closed
loganzartman opened this issue Feb 18, 2023 · 1 comment
Closed

modularize shaders #4

loganzartman opened this issue Feb 18, 2023 · 1 comment

Comments

@loganzartman
Copy link
Owner

loganzartman commented Feb 18, 2023

the shaders are a mess with tons of copy-pasted code.

I already tried glslify, but it is broken for webgl2. there's already a PR open that might fix all my problems, but glslify seems pretty dead. It might be easiest to define shaders in JS with a glsl template literal, and use string interpolation to do some very basic code reuse.

@loganzartman
Copy link
Owner Author

wrote a 100 line shader preprocessor that does the job for now

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

No branches or pull requests

1 participant