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

Pre-compiled shaders in GLUP #225

Open
5 tasks
BrunoLevy opened this issue Feb 12, 2025 · 0 comments
Open
5 tasks

Pre-compiled shaders in GLUP #225

BrunoLevy opened this issue Feb 12, 2025 · 0 comments
Labels
enhancement New feature or request geogram_gfx

Comments

@BrunoLevy
Copy link
Owner

BrunoLevy commented Feb 12, 2025

Use SPIR-V pre-compiled shaders in GLUP

  • try fullscreen effects first
  • then implement a new GLUP context (that can cohabit with the existing ones) and a flag to enable it
  • remove the old GLUP context

... and later

  • Vulcan version (SPIR-V is a smooth transition towards that direction)

... and also, if possible

  • Make GLUP a standalone library (usable in Polyscope for instance)

This may not work with WebGL that probably does not have pre-compiled shaders (but we might keep the WebGL context in the end, and only compile it in Emscripten mode)

SPIR-V documentation
Works mostly like GLSL shaders (pass a pre-compiled binary instead of an ASCII shader source). There are interesting differences that will make things easier for GLUP:

  • a single SPIR-V binary can contain multiple stages / multiple entry points
  • some constants can be specified (like templates): can be used to implement GLUP state toggles

and also some differences that will make it more difficult:

  • location needs to be explicit (for all interface blocks)
  • unfortunately it will not be possible to use the same source for OpenGL and Vulkan (because resource binding is too different)
@BrunoLevy BrunoLevy added enhancement New feature or request geogram_gfx labels Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request geogram_gfx
Projects
None yet
Development

No branches or pull requests

1 participant