-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
a tool and a helper to statically analyze shader sources #3157
Comments
Probably commenting is better since any library can prepare this without waiting for Ebitengine 2.9. //ebitengine:shader
const superUltraShader = "package main
func Fragment(..." |
hajimehoshi
added a commit
that referenced
this issue
Nov 10, 2024
This adds a new compiler directive `//ebitengine:shader` indicating a shader source. A new tool internal/shaderlister can iterates all the shader strings with the directive. The tool might be exposed in the future. Updates #3157
hajimehoshi
added a commit
that referenced
this issue
Nov 10, 2024
hajimehoshi
added a commit
that referenced
this issue
Nov 10, 2024
Add a new field to provide compilation results like See also: 48f79af |
hajimehoshi
added a commit
that referenced
this issue
Nov 16, 2024
hajimehoshi
added a commit
that referenced
this issue
Nov 16, 2024
hajimehoshi
added a commit
that referenced
this issue
Nov 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Operating System
What feature would you like to be added?
In order to introduce shader precompilation, we need to know what shader sources are used. We have to list them before the compilation. Listing them by users would not be a good solution since unknown dependencies might use shaders internally, and users couldn't know them.
In order to resolve this issue, what about this?
ebiten.RegisterShader(src []byte)
(orstring
?). This function is just a marker and does nothing.RegisterShader
, and output them as JSON or something.Libralies using shaders would have to call
RegisterShader
to precompile the shader source, but it should be much better than having to export shader sources as a public API.Why is this needed?
No response
The text was updated successfully, but these errors were encountered: