hajimehoshi / ebiten

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

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

Open hajimehoshi opened 6 months ago

hajimehoshi commented 6 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 2 months ago

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

hajimehoshi commented 2 months ago

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