hajimehoshi / ebiten

Ebitengine - A dead simple 2D game engine for Go
https://ebitengine.org
Apache License 2.0
11.13k stars 665 forks source link

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

Open hajimehoshi opened 7 months ago

hajimehoshi commented 7 months ago

Operating System

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 commented 3 months ago

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

hajimehoshi commented 3 months ago

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