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

Refactor GLSL code into .glsl files #51

Open
jimbojw opened this issue Sep 19, 2022 · 1 comment
Open

Refactor GLSL code into .glsl files #51

jimbojw opened this issue Sep 19, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@jimbojw
Copy link
Collaborator

jimbojw commented Sep 19, 2022

Currently, the GLSL code for Megaplot is in large template strings in files under src/lib/shaders. As such, code support tooling such as syntax highlighting rarely works.

Instead, it would be better to have GLSL source code live in files with a .glsl extension. These could be loaded directly in TypeScript via the webpack-glsl-loader plugin, or by some other method.

@jimbojw jimbojw added the help wanted Extra attention is needed label Mar 14, 2023
@jimbojw
Copy link
Collaborator Author

jimbojw commented Mar 14, 2023

Complicating matters: a good amount of the GLSL code for Megaplot is generated (see src/lib/attribute-mapper.ts for example). Any solution should account for these generated fragments.

The generated code currently is generated in the browser on the fly, but it could be generated via a pre-processing step. See util/generate-code.ts for an example of current code generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant