-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add .vs GLSL vertex shader extension #6536
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the samples you've referenced in the template to the PR in the GLSL samples directory and update the template to state the licence of each file. ProTip: if the file is not shown fully in the diff, it's too big so should be replaced with a smaller file. Two samples should be plenty so pick two that differ the most (these are used to train the classifier).
Please also update the search query in the template.
Sample GLSL file with a `.vs` extension from Google's filament repo: https://github.com/google/filament/blob/main/shaders/src/main.vs Licensed under Apache License 2.0
From file from the https://github.com/FrostKiwi/Mirrorball/blob/main/src/shd/project.vs repo https://github.com/FrostKiwi/Mirrorball under the MIT licence.
Updated to reflected the requested changes. |
Added missing
.vs
extension to recognize.vs
files asGLSL
.For GLSL fragment shaders it is common to have either
.fs
or.frag
as your file extension. Both are present in this line oflanguages.yml
. For the vertex shader however, only.vert
is present and the counterpart to.fs
,.vs
has been forgotten. This has been fixed with this PRDescription
This solves GitHub support ticket #2320418, which had the following issue:
Issue caused by .vs not being in linguist
The main GitHub website does Syntax Highlighting based on the language it detects. It also shows a repo's language breakdown:
This feature has a bug when detecting GLSL Shaders. You can observe this bug in my repo: https://github.com/FrostKiwi/Mirrorball
Take a look at the detected GLSL shaders: https://github.com/search?q=repo%3AFrostKiwi%2FMirrorball++language%3AGLSL&type=code and what is actually in that directory: https://github.com/FrostKiwi/Mirrorball/tree/main/src/shd
You see two file types.
The GLSL Fragment Shaders with a .fs file extension.
The GLSL Vertex Shaders with a .vs file extension
.fs for fragment shaders and .vs for vertex shaders are a common choise along side .frag and .vert. So this is not a repo-specific naming, but a common one.
Checklist:
.vs
files, but all.fs
in those same repos have it):Apache License 2.0
Licence fileMIT licence
Licence fileGLSL
and.vs
is unique toGLSL
, at least in linguist.