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

shaderprecomp, internal/graphicsdriver/directx, internal/graphicsdriver/metal: use precompiled shader for bulitin shaders and remove AppendBuiltinShaderSources #2984

Open
3 of 11 tasks
hajimehoshi opened this issue May 6, 2024 · 2 comments

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented May 6, 2024

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

What feature would you like to be added?

If the result of shader precompilation is deterministic, we can always use them for Ebitengine builtin shaders.

Why is this needed?

Precompiled shaders can skip online compiling and improve performance.

@hajimehoshi hajimehoshi added this to the v2.8.0 milestone May 6, 2024
@hajimehoshi hajimehoshi changed the title internal/graphicsdriver/directx, internal/graphicsdriver/metal: use precompiled shader for bulitin shaders shaderprecomp, internal/graphicsdriver/directx, internal/graphicsdriver/metal: use precompiled shader for bulitin shaders and remove AppendBuiltinShaderSources Aug 17, 2024
@hajimehoshi
Copy link
Owner Author

After this change, we will be able to remove AppendBuiltinShaderSource and ShaderSource itself.

@hajimehoshi
Copy link
Owner Author

Even without shaderprecomp package, precompiling a builtin shaders would be a good optimization.

hajimehoshi added a commit that referenced this issue Aug 18, 2024
With #2984, we realized some considerations:

* Builtin shaders don't have to or should not be exposed.
* The shader complation processes like what the examples/shaderprecomp
  does can be provided by this package

Thus, until we decide a better API design, we'd like to retract the
package once.

Updates #2861
@hajimehoshi hajimehoshi modified the milestones: v2.8.0, v2.9.0 Sep 2, 2024
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

1 participant