-
Notifications
You must be signed in to change notification settings - Fork 58
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
Identification of shaders #10
Comments
It would be great to have a feature like that, but I don't see how it could be done so the labels stay between reloads. The WebGLPrograms don't have an easily identifiable trait. I'm adding a UUID, but that changes every time a program is created, so it's not consistent across sessions. The order of creation looks like it's reliable, but it might change if the shaders are created from files downloaded from a network, or if they depend on loading a model, etc. Storing a reference to the combination of vertex shader source and fragment shader source might work, but it sounds very brittle as a solution. There might be something to investigate there. In the mean time, the option is to use shader highlighting, but it's disabled at the moment since it's creating problems. Once it's fixed it'll be easier to identify each shader. |
You could just take the first comment in the vertex shader source to be the name, I guess (or look for a comment with a specific prefix) |
Ok. Based on the discussion here, this is how it's implemented: |
Is there a simple way I can tag my shaders, so that the UI knows what each one is? (I.e. sticking some sort of comment at the top of the source, so it can show "Main", "Post Process", "Overlay", etc rather than "Program 0", "Program 1", "Program 2")
The text was updated successfully, but these errors were encountered: