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

Shift from framework to library #9

Open
vorg opened this issue Jan 13, 2024 · 3 comments
Open

Shift from framework to library #9

vorg opened this issue Jan 13, 2024 · 3 comments

Comments

@vorg
Copy link
Member

vorg commented Jan 13, 2024

So.. this approach is good on paper but causes many problems in practice for development of pex-renderer. What about moving to more of a library than framework approach with pex-shaders? So pure utils only and all the setup and wrapper code would move back to pex-renderer? Basically all chunks with main() in them... that would allow us develop new features in pex-renderer and move out to pex-shaders when stable.

@vorg
Copy link
Member Author

vorg commented Apr 8, 2024

@dmnsgn any thoughts on this? My initial idea for pex-shaders was more of Lygia than removing every single line of GLSL from pex-renderer. Ideally this lib would have only pure functions and everything requiring uniforms or setup would be left in pex-renderer for faster iteration and prototyping. So pex-shaders is more like glsl-utils than pex-renderer-glsl

@dmnsgn
Copy link
Member

dmnsgn commented Apr 8, 2024

Philosophically, I agree. But:

  • Many chunks are tightly coupled with their uniforms and their #defines
  • I would do that refactor while removing GLSL 100 as well
  • I would group chunks into subfolders
  • Standard vert/frag will have a big git diff so that would be a "rip-off the bandaid" point (ie. git history will be meh but it has to happen at some point)
  • pure functions and passing variables around might not be best for performance

On the plus side:

  • pure = good
  • will be easier for wgsl
  • might help with tree shaking (given some extra work in pex-renderer)

@vorg
Copy link
Member Author

vorg commented Apr 9, 2024

Standard vert/frag will have a big git diff so that would be a "rip-off the bandaid" point (ie. git history will be meh but it has to happen at some point

Because of change to GLSL 300?

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

No branches or pull requests

2 participants